/** * Get field HTML * * @param mixed $meta * @param array $field * * @return string */ static function html($meta, $field) { $field->options = self::get_options($field); switch ($field->field_type) { case 'select': return Field_Select::html($meta, $field); case 'select_advanced': default: return Field_Select_Advanced::html($meta, $field); } }
/** * Get field HTML * * @param mixed $meta * @param array $field * * @return string */ public static function html($meta, $field) { $field->options = self::get_options($field); switch ($field->field_type) { case 'select': $html = Field_Select::html($meta, $field); break; case 'select_advanced': default: $html = Field_Select_Advanced::html($meta, $field); } return $html; }
/** * Get field HTML * * @param $field * @param $meta * * @return string */ static function html($meta, $field) { $options = $field->options; $terms = get_terms($options['taxonomy'], $options['args']); $field->options = self::get_options($terms); $field->display_type = $options['type']; $html = ''; switch ($options['type']) { case 'checkbox_list': $html = Field_Checkbox_List::html($meta, $field); break; case 'checkbox_tree': $elements = self::process_terms($terms); $html .= self::walk_checkbox_tree($meta, $field, $elements, $options['parent'], true); break; case 'select_tree': $elements = self::process_terms($terms); $html .= self::walk_select_tree($meta, $field, $elements, $options['parent'], true); break; case 'select_advanced': $html = Field_Select_Advanced::html($meta, $field); break; case 'select': default: $html = Field_Select::html($meta, $field); } return $html; }