args('level')?1:0; $default = $field->args('default'); if(!is_array($default)) $default = array(); if(!isset($default['left'])) $default['left'] = 0; if(!isset($default['top'])) $default['top'] = 0; if(!isset($default['right'])) $default['right'] = 0; if(!isset($default['bottom'])) $default['bottom'] = 0; //if(!isset($default['enable'])) $default['enable'] = 0; $value = wp_parse_args( $value, array( 'left' => $default['left'], 'top' => $default['top'], 'right' => $default['right'], 'bottom' => $default['bottom'], //'enable' => $default['enable'], )); ?>
input( array( 'name' => $field_type_object->_name('[left]' ), 'id' => $field_type_object->_id('[left]' ), 'value' => $value['left'], 'class' => 'form-control '.$field->args('class') , )); ?>
input( array( 'name' => $field_type_object->_name('[top]' ), 'id' => $field_type_object->_id('[top]' ), 'value' => $value['top'], 'class' => 'form-control '.$field->args('class') , )); ?>
input( array( 'name' => $field_type_object->_name('[right]' ), 'id' => $field_type_object->_id('[right]' ), 'value' => $value['right'], 'class' => 'form-control '.$field->args('class') , )); ?>
input( array( 'name' => $field_type_object->_name('[bottom]' ), 'id' => $field_type_object->_id('[bottom]' ), 'value' => $value['bottom'], 'class' => 'form-control '.$field->args('class') , )); ?>
_desc( true ); } add_filter( 'cmb2_render_padding', 'twoj_padding_field_callback', 10, 5 );