Esempio n. 1
0
 public function __construct($base)
 {
     parent::__construct();
     $this->base = $base;
     // Normally the form assumes a very nicely formatted string with correct scheme and non-standard port detection. This breaks certain non-standard setups. Easiest to just use whatever scheme we're currently using.
     $this->set_attribute('action', remove_query_arg('non_existent_query'));
     foreach (array('primary_button', 'secondary_button', 'wp_editor') as $input) {
         $o = new \stdClass();
         $o->name = $input;
         $o->class = sprintf('\\plainview\\sdk_broadcast\\wordpress\\form2\\inputs\\%s', $input);
         $this->register_input_type($o);
     }
 }
Esempio n. 2
0
 public function __toString()
 {
     return \plainview\sdk_broadcast\form2\form::unfilter_text($this->get_value());
 }
Esempio n. 3
0
 /**
 		@brief		Filter and set the label.
 		@param		string		$label		Label to filter and set.
 		@return		this		Object chaining.
 		@since		20130524
 	**/
 public function set_label($label)
 {
     return $this->set_unfiltered_label(\plainview\sdk_broadcast\form2\form::filter_text($label));
 }
Esempio n. 4
0
 /**
 		@brief		Filter and set the placeholder text.
 		@param		string		$placeholder		The new placeholder text.
 		@return		this		Object chaining.
 		@see		get_placeholder()
 		@since		20130524
 	**/
 public function set_placeholder($placeholder)
 {
     $placeholder = \plainview\sdk_broadcast\form2\form::filter_text($placeholder);
     return $this->set_attribute('placeholder', $placeholder);
 }
Esempio n. 5
0
 /**
 		@brief		Filters and sets the new value.
 		@param		string		$value		Value to filter and set.
 		@return		this		Object chaining.
 		@see		get_value()
 		@see		value()
 		@since		20130524
 	**/
 public function set_value($value)
 {
     $value = $this->apply_value_filters($value);
     $value = \plainview\sdk_broadcast\form2\form::filter_text($value);
     return $this->set_unfiltered_value($value);
 }
Esempio n. 6
0
 /**
 		@brief		Set the title attribute.
 		@details	Also sets the title attribute of the label.
 		@return		this		Object chaining.
 		@since		20131001
 	**/
 public function title($title)
 {
     $title = \plainview\sdk_broadcast\form2\form::filter_text($title);
     $this->label->title($title);
     $this->set_attribute('title', $title);
     return $this;
 }