Esempio n. 1
0
 /**
  * Constructor
  * @param string $name  Field name
  * @param string $label Field label
  * @param mixed $value Field value
  */
 function __construct($name = 'name', $label = 'Name', $value = null, $meta = array())
 {
     $defaults = array('options' => array(), 'allow_null' => false, 'multiple' => false);
     $meta = array_merge($defaults, $meta);
     $this->options = is_array($meta['options']) ? $meta['options'] : array();
     $this->allow_null = is_bool($meta['allow_null']) ? $meta['allow_null'] : false;
     $this->multiple = is_bool($meta['multiple']) ? $meta['multiple'] : false;
     parent::__construct($name, $label, $value, $meta);
 }
Esempio n. 2
0
 /**
  * Constructor
  * @param string $name  Field name
  * @param string $label Field label
  * @param mixed $value Field value
  */
 function __construct($name = 'name', $label = 'Name', $value = null, $meta = array())
 {
     parent::__construct($name, $label, $value, $meta);
     add_filter('wp_default_editor', array($this, 'wp_default_editor'));
 }
Esempio n. 3
0
 /**
  * Constructor
  * @param string $name  Field name
  * @param string $label Field label
  * @param mixed $value Field value
  */
 function __construct($name = 'name', $label = 'Name', $value = null, $meta = array())
 {
     parent::__construct($name, $label, $value, $meta);
 }