芝麻web文件管理V1.00
编辑当前文件:/home/seolotod/www/wp-content/themes/brunn/framework/lib/qodef.layout.tax.php
type = $type; $this->name = $name; $this->label = $label; $this->description = $description; $this->options = $options; $this->args = $args; $this->hidden_property = $hidden_property; $this->hidden_values = $hidden_values; add_filter( 'brunn_select_filter_taxonomy_fields', array( $this, 'addFieldForEditSave' ) ); } public function addFieldForEditSave( $names ) { //for icon type of field add additonal icon font family based names for saving if ( $this->type == 'icon' ) { $icons_collections = brunn_select_icon_collections()->getIconCollectionsKeys(); foreach ( $icons_collections as $icons_collection ) { $icons_param = brunn_select_icon_collections()->getIconCollectionParamNameByKey( $icons_collection ); $names[] = $this->name . '_' . $icons_param; } } $names[] = $this->name; return $names; } public function render( $factory ) { $hidden = false; if ( isset( $_GET['tag_ID'] ) ) { if ( ! empty( $this->hidden_property ) ) { foreach ( $this->hidden_values as $value ) { if ( get_term_meta( $_GET['tag_ID'], $this->hidden_property, true ) == $value ) { $hidden = true; } } } } $factory->render( $this->type, $this->name, $this->label, $this->description, $this->options, $this->args, $hidden ); } } abstract class BrunnSelectClassTaxonomyFieldType { abstract public function render( $name, $label = "", $description = "", $options = array(), $args = array() ); } class BrunnSelectClassTaxonomyFieldText extends BrunnSelectClassTaxonomyFieldType { public function render( $name, $label = "", $description = "", $options = array(), $args = array(), $hidden = false ) { if ( ! isset( $_GET['tag_ID'] ) ) { ?>
</textarea>
</textarea>
" name="" $value ) { ?> data-show-="" $value ) { ?> data-hide-="" id=""> $value ) { if ( $key == "-1" ) { $key = ""; } ?>
" $value ) { ?> data-show-="" $value ) { ?> data-hide-="" id=""> $value ) { if ( $key == "-1" ) { $key = ""; } ?>
value="">
" name="" $value ) { ?> data-show-="" $value ) { ?> data-hide-="" id="">
$value ) { if ( $key == "-1" ) { $key = ""; } ?>
" $value ) { ?> data-show-="" $value ) { ?> data-hide-="" id="">
value="">
$value ) { if ( $key == "-1" ) { $key = ""; } ?>
value="">
$option_label ) : ?>
type="checkbox" id="" value="" name="" />
$option_label ) : ?>
type="checkbox" id="" value="" name="" />
getIconCollectionsEmpty(); $icons_collections = brunn_select_icon_collections()->getIconCollectionsKeys(); if ( ! isset( $_GET['tag_ID'] ) ) { ?>
$key ) { ?>
getIconCollectionParamNameByKey( $icons_collection ); ?>
getIconCollection( $icons_collection ); foreach ( $icons->icons as $option => $key ) { ?>
$key ) { ?>
>
getIconCollectionParamNameByKey( $icons_collection ); $field_class = $icon_pack == $icons_collection ? 'qodef-table-row' : 'qodef-hide'; ?>
getIconCollection( $icons_collection ); $active_icon = get_term_meta( $_GET['tag_ID'], $name . '_' . $icons_param, true ); foreach ( $icons->icons as $option => $key ) { ?>
>
render( $name, $label, $description, $options, $args, $hidden ); break; case 'textarea': $field = new BrunnSelectClassTaxonomyFieldTextArea(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'image': $field = new BrunnSelectClassTaxonomyFieldImage(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'select': $field = new BrunnSelectClassTaxonomyFieldSelect(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'selectblank': $field = new BrunnSelectClassTaxonomyFieldSelectBlank(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'checkboxgroup': $field = new BrunnSelectClassTaxonomyFieldCheckBoxGroup(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'icon': $field = new BrunnSelectClassTaxonomyFieldIcon(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; case 'color': $field = new BrunnSelectClassTaxonomyFieldColor(); $field->render( $name, $label, $description, $options, $args, $hidden ); break; default: break; } } }