Input::set_subtype()
Description #
Check and set sub type of a field.
Source #
File: lib/form/class-input.php
private function set_subtype() {
$allowed_subtype = array(
'text',
'hidden',
'number',
'email',
'password',
'date',
'datetime-local',
'color',
'url',
);
$subtype = 'text';
if ( in_array( $this->args['subtype'], $allowed_subtype, true ) ) {
$subtype = $this->args['subtype'];
}
$this->subtype = $subtype;
}
Expand full source code Collapse full source code View on GitHub: lib/form/class-input.php:99
Add your comment