/**
  * Constructor for the checkbox field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     parent::__construct($data);
 }
 /**
  * Constructor for the divider field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     $this->_text = $data['text'];
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('style' => 'section_break'));
     parent::__construct($data);
 }
 /**
  * Constructor for the color field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('multiple' => false, 'palette' => false));
     parent::__construct($data);
 }
 /**
  * Constructor for the textarea field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('rows' => '2', 'cols' => '20', 'rich' => false, 'full' => false));
     parent::__construct($data);
 }
 /**
  * Constructor for the number field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('step' => '', 'min' => '', 'max' => ''));
     parent::__construct($data);
 }
Пример #6
0
 /**
  * Constructor for the date field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('style' => '', 'size' => '', 'format' => 'yy-mm-dd'));
     parent::__construct($data);
 }
 /**
  * Constructor for the image field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('multiple' => false, 'sortable' => false, 'breakpoints' => false, 'density' => false, 'image_size' => false, 'thumb_size' => 'medium'));
     parent::__construct($data);
 }
 /**
  * Constructor for the text field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('vertical' => false, 'data' => array(), 'max' => false, 'create' => false));
     parent::__construct($data);
 }
 /**
  * Constructor for the radio field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('graphic' => false, 'data' => array()));
     parent::__construct($data);
 }
Пример #10
0
 /**
  * Constructor for the text field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('style' => '', 'size' => '', 'full' => false, 'link' => false));
     parent::__construct($data);
 }
 /**
  * Constructor for the text field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = array();
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('style' => ''));
     parent::__construct($data);
     $this->_fields = $data['fields'];
 }
Пример #12
0
 /**
  * Constructor for the icon field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     // $data['config'] = wp_parse_args( $data['config'], array(
     // 	'size' => ''
     // ) );
     parent::__construct($data);
 }
 /**
  * Constructor for the attachment field class.
  *
  * @since 0.4.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     if (!isset($data['default'])) {
         $data['default'] = '';
     }
     if (!isset($data['config'])) {
         $data['config'] = array();
     }
     $data['config'] = wp_parse_args($data['config'], array('type' => '', 'multiple' => false, 'sortable' => false, 'thumb_size' => 'medium'));
     if (!in_array($data['config']['type'], array('', 'image', 'audio', 'video', 'application'))) {
         $data['config']['type'] = '';
     }
     parent::__construct($data);
 }
 /**
  * Constructor for the text field class.
  *
  * @since 0.1.0
  * @param array $data The field data structure.
  */
 public function __construct($data)
 {
     parent::__construct($data);
     $this->_fields = $data['fields'];
 }