protected function get_label_classes() { $label_classes = parent::get_label_classes(); if (empty($this->hide)) { $label_classes[] = 'siteorigin-widget-section-visible'; } return $label_classes; }
protected function render_field_label($value, $instance) { if ($this->collapsible) { parent::render_field_label($value, $instance); } }
protected function render_after_field($value, $instance) { if (!empty($this->fallback)) { $fallback_name = $this->get_fallback_field_name($this->base_name); $fallback_url = !empty($instance[$fallback_name]) ? $instance[$fallback_name] : ''; ?> <input type="text" value="<?php echo esc_url($fallback_url); ?> " placeholder="<?php esc_attr_e('External URL', 'so-widgets-bundle'); ?> " name="<?php echo esc_attr($this->for_widget->so_get_field_name($this->base_name . '_fallback', $this->parent_container)); ?> " class="media-fallback-external siteorigin-widget-input" /> <div class="clear"></div> <?php } else { ?> <div class="clear"></div> <?php } //Still want the default description, if there is one. parent::render_after_field($value, $instance); }
protected function render_field_label() { if ($this->collapsible) { parent::render_field_label(); } }
public function __construct($base_name, $element_id, $element_name, $field_options, $for_widget, $parent_container = array()) { parent::__construct($base_name, $element_id, $element_name, $field_options); $this->for_widget = $for_widget; $this->parent_repeater = $parent_container; }