Пример #1
0
    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);
    }