コード例 #1
0
 /**
  * Založení objektu typu Switch
  *
  * @param string $name - hash v poli
  * @param string $label - popisek v html
  * @return self
  */
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
     $this->addAttrClass(self::FIELD_TYPE);
     $this->setValue(self::NO);
     return $this;
 }
コード例 #2
0
 /**
  * Založení objektu typu Switch
  *
  * @param string $name - hash v poli
  * @param string $label - popisek v html
  * @return self
  */
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
     $this->addAttrClass(self::FIELD_TYPE);
     $this->setDefaultValue(self::NO);
     $this->setFilterSanitize(FILTER_SANITIZE_NUMBER_INT);
     return $this;
 }
コード例 #3
0
 /**
  * @param string $action - WP nonce akce
  * @param string $name - hash v poli
  * @param string $label - popisek v HTML
  */
 public function __construct($action, $name, $label)
 {
     parent::__construct($name, $label);
     if (KT::issetAndNotEmpty($action)) {
         $this->action = $action;
     } else {
         throw new KT_Not_Supported_Exception("Empty Nonce Action");
     }
 }
コード例 #4
0
 /**
  * Založení objektu typu Hidden
  *
  * @param string $name - hash v poli
  * @param string $label - popisek v html
  * @return self
  */
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
 }
コード例 #5
0
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
     $this->setFilterSanitize(FILTER_DEFAULT);
     $this->options = array("media_buttons" => false, "textarea_name" => $this->getNameAttribute(), "textarea_rows" => 10, "teeny" => false, "quicktags" => false);
 }
コード例 #6
0
 /**
  * Založení objektu typu image loader - pouze Admin sekce
  * 
  * Pro funkčnost je ve stránce je nutné mít načteno:
  * wp_enqueue_media();
  * wp_enqueue_script("kt-img-loader");
  * 
  * @author Tomáš Kocifaj
  * @link http://www.ktstudio.cz
  *
  * @param string $name - hash v poli
  * @param string $label - popisek v html
  * @return self
  */
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
     $this->addAttrClass("kt-file-loader button");
 }
コード例 #7
0
 /**
  * 
  * @param string $name
  * @param string $label 
  * @param array $fieldsetRecipy Recept na fieldset
  */
 public function __construct($name, $label, array $fieldsetRecipy)
 {
     parent::__construct($name, $label);
     $this->fieldsetRecipy = $fieldsetRecipy;
 }
コード例 #8
0
 public function __construct($name, $label)
 {
     parent::__construct($name, $label);
     $this->addAttrClass("colorField");
 }