public function __construct($namespace, $properties) { $this->default_properties = array(); parent::__construct($namespace, $properties); // Add default value to options if (isset($this->properties['default']) && ($default = $this->properties['default']) || ($this->properties['default'] = "<i>Choose</i>")) { $this->properties['options'] = array_diff_key(array('0' => $this->properties['default']), $this->properties['options']) + $this->properties['options']; } }
public function __construct($namespace, $properties) { // Verify there's a render callback saved if (!is_array($properties['callbacks']) || !isset($properties['callbacks']['render'])) { throw new Exception("Render callback must be defined"); } $this->default_properties = array(); parent::__construct($namespace, $properties); }
public function __construct($namespace, $properties) { $this->default_properties = array('checked' => false, 'admin-column' => array('label-checked' => 'Yes', 'label-unchecked' => 'No')); parent::__construct($namespace, $properties); }
public function __construct($namespace, $properties) { $this->default_properties = array('dateFormat' => 'yy-mm-dd'); parent::__construct($namespace, $properties); add_action('admin_footer', array($this, 'render_js')); }
public function __construct($namespace, $properties) { $this->default_properties = array(); parent::__construct($namespace, $properties); }