/**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-icon-chooser-select', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-icon-chooser-select');
     }
     return parent::filter_field_attr($attr);
 }
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-ui-slider', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-ui-slider');
     }
     return parent::filter_field_attr($attr);
 }
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-togglable-fieldsets', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-togglable-fieldsets');
     }
     return parent::filter_field_attr($attr);
 }
Exemple #4
0
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-code-editor-textarea', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-code-editor-textarea');
     }
     return parent::filter_field_attr($attr);
 }
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     $attr['multiple'] = true;
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-multiselect', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-multiselect');
     }
     return parent::filter_field_attr($attr);
 }
Exemple #6
0
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     $class = 'youxi-form-list';
     if ($this->get_option('inline')) {
         $class .= ' inline';
     }
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class($class, $attr['class']);
     }
     return parent::filter_field_attr($attr);
 }
 /**
  * Apply form item attributes filtering
  * 
  * @param array The current attributes of the field
  *
  * @return array The filtered attributes of the field
  */
 public function filter_field_attr($attr)
 {
     $attr['maxlength'] = 7;
     $attr['data-hide'] = $this->get_option('hide');
     $attr['data-palette'] = $this->get_option('palette');
     $attr['data-default-color'] = $this->get_option('std');
     if (isset($attr['class'])) {
         $attr['class'] = Youxi_Form::normalize_class('youxi-wp-color-picker', $attr['class']);
     } else {
         $attr['class'] = Youxi_Form::normalize_class('youxi-wp-color-picker');
     }
     return parent::filter_field_attr($attr);
 }