/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'text'); $this->set_attr('class', 'oxy-date-field'); $this->set_attr('value', $value); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'text'); $this->set_attr('class', 'colour-option'); $this->set_attr('value', $value); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'text'); $this->set_attr('class', 'slider-option'); $this->set_attr('value', floatval($value)); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'hidden'); $this->set_attr('value', esc_attr($value)); $this->set_attr('id', $field['id']); $this->set_attr('data-store', $field['store']); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { // check for multiple and add a [] to the name if it is if (isset($field['attr']) && is_array($field['attr']) && array_key_exists('multiple', $field['attr'])) { if (isset($attr['name'])) { $attr['name'] .= '[]'; } } parent::__construct($field, $value, $attr); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'text'); $this->set_attr('class', 'colour-option'); // set extra format class if set in field if (isset($field['format'])) { $this->set_attr('class', 'format-' . $field['format']); } $this->set_attr('value', $value); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'radio'); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'text'); $this->set_attr('value', esc_attr($value)); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); $this->set_attr('type', 'number'); $this->set_attr('value', intval($value)); }
/** * Creates option * * @return void * @since 1.0 **/ public function __construct($field, $value, $attr) { parent::__construct($field, $value, $attr); }