Exemplo n.º 1
0
 /**
  * @param string $tag_name
  * @param array $attributes
  * @param null ,mixed $value
  * @param bool $reuse
  *
  * @return WP_Html_Element
  */
 static function get_html_element($tag_name, $attributes = array(), $value = null, $reuse = false)
 {
     if (!$reuse) {
         $element = new WP_Html_Element($tag_name, $attributes, $value);
     } else {
         /**
          * @var WP_Html_Element $reusable_element
          */
         static $reusable_element = false;
         if (!$reusable_element) {
             $reusable_element = new WP_Html_Element($tag_name, $attributes, $value);
         } else {
             $reusable_element->reset_element($tag_name, $attributes, $value);
         }
         $element = $reusable_element;
     }
     return $element;
 }
 /**
  * @return string
  */
 function get_field_html()
 {
     $this->wrapper->element_value = $this->get_features_html();
     $feature_html = $this->wrapper->get_element_html();
     return $feature_html;
 }
 /**
  * @param string $attribute_name
  * @param mixed $value
  */
 function set_html_attribute($attribute_name, $value)
 {
     $this->element->set_attribute($attribute_name, $value);
 }