Remove unneeded number controls/logic

This commit is contained in:
Robin Cornett
2019-06-26 09:02:03 -04:00
parent 243bfff7ac
commit 53f74dedcc
3 changed files with 2 additions and 19 deletions
@@ -156,10 +156,7 @@ class DisplayFeaturedImageGenesisWidgetsBlocksFields {
'label' => $field['args']['label'],
'method' => $method,
);
if ( in_array( 'number', array( $field_type, $method ), true ) ) {
$attributes['min'] = $field['args']['min'];
$attributes['max'] = $field['args']['max'];
} elseif ( 'select' === $method ) {
if ( 'select' === $method ) {
$attributes['options'] = $this->convert_choices_for_select( $field['args']['choices'] );
}
@@ -175,9 +172,6 @@ class DisplayFeaturedImageGenesisWidgetsBlocksFields {
*/
private function get_field_type( $method ) {
$type = 'string';
if ( 'number' === $method ) {
return $method;
}
if ( 'checkbox' === $method ) {
return 'boolean';
}