/** * 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; }
/** * 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; }
/** * @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"); } }
/** * 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); }
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); }
/** * 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"); }
/** * * @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; }
public function __construct($name, $label) { parent::__construct($name, $label); $this->addAttrClass("colorField"); }