/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ public static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes['multiple'] = false; $attributes['id'] = false; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ public static function get_attributes($field, $value = null) { switch ($field['field_type']) { case 'checkbox_list': case 'radio_list': return MASHSB_RWMB_Input_List_Field::get_attributes($field, $value); break; case 'select_advanced': $attributes = MASHSB_RWMB_Select_Advanced_Field::get_attributes($field, $value); $attributes['class'] .= ' mashsb-rwmb-select_advanced'; return $attributes; break; case 'select_tree': return MASHSB_RWMB_Select_Tree_Field::get_attributes($field, $value); break; case 'select': default: return MASHSB_RWMB_Select_Field::get_attributes($field, $value); break; } }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * @return array */ public static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes = wp_parse_args($attributes, array('data-options' => wp_json_encode($field['js_options']))); return $attributes; }