Esempio n. 1
0
 /**
  * Render the Element View.
  *
  * @return string
  * @since 1.3
  */
 public function render_element(Element $e)
 {
     $atts = clone $e->get_atts_obj();
     if ($atts->has_attr(array('multiple', 'name'))) {
         $name = $atts->get_attr('name');
         if (substr($name, -2) !== '[]') {
             $atts->set_attr('name', $name . '[]');
         }
     }
     $content = '<select' . strval($atts) . '>';
     $content .= $this->render_options($e->get_value_options(), $e->get_value());
     $content .= '</select>';
     return $content;
 }
Esempio n. 2
0
 /**
  * Render the Element View.
  *
  * @return string
  * @since 1.3
  */
 public function render_element(Element $e)
 {
     return $this->render_tag('textarea', $e->get_atts_obj(), esc_textarea($e->get_value()));
 }
Esempio n. 3
0
 /**
  * Render the Element View.
  *
  * @return string
  * @since 1.3
  */
 public function render_element(Element $e)
 {
     return $this->render_tag('button', $e->get_atts_obj(), $e->get_content());
 }