/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->range = isset($field['range']) ? $field['range'] === true ? true : false : false; $this->inline = isset($field['inline']) ? $field['inline'] === true ? true : false : true; $subtype = $this->range === true ? 'simcal-field-date-picker-range ' : ''; $this->type_class = 'simcal-field-date-picker ' . $subtype; $data = array('data-inline' => $this->inline === true ? 'true' : 'false'); $field['attributes'] = isset($field['attributes']) ? array_merge($field['attributes'], $data) : $data; parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->type_class = 'simcal-field-textarea'; parent::__construct($field); if (!empty($field['value'])) { $this->value = esc_textarea($field['value']); } if (!empty($field['default'])) { $this->default = esc_textarea($field['default']); } }
/** * Constructor. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->subtype = isset($field['subtype']) ? $field['subtype'] : ''; $this->type_class = 'simcal-field-datetime-format simcal-field-' . $this->subtype . '-format-field'; $this->timestamp = mktime(13, 10, 00, 1, 1, intval(date('Y', time())) + 1); parent::__construct($field); if (empty($this->value)) { if ('date' == $this->subtype) { $this->value = 'l, d F Y'; } if ('time' == $this->subtype) { $this->value = 'G:i a'; } } }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $class = 'simcal-field-select'; $enhanced = isset($field['enhanced']) ? $field['enhanced'] : ''; if ('enhanced' == $enhanced) { $this->enhanced = true; $class .= ' simcal-field-select-enhanced'; } $multiselect = isset($field['multiselect']) ? $field['multiselect'] : ''; if ('multiselect' == $multiselect) { $this->multiselect = true; $class .= ' simcal-field-multiselect'; } $this->type_class = $class; $allow_void = isset($field['allow_void']) ? $field['allow_void'] : ''; $this->allow_void = 'allow_void' == $allow_void ? true : false; parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->subtype = isset($field['subtype']) ? esc_attr($field['subtype']) : 'text'; $this->type_class = 'simcal-field-' . $this->subtype; parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->type_class = 'simcal-field-radios'; $this->inline = isset($field['inline']) ? 'inline' == $field['inline'] ? true : false : false; parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->addon = isset($field['addon']) ? esc_attr($field['addon']) : ''; $this->type_class = 'simcal-field-license'; parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { parent::__construct($field); }
/** * Construct. * * @since 3.0.0 * * @param array $field */ public function __construct($field) { $this->type_class = 'simcal-field-checkboxes'; parent::__construct($field); }