text_fields = array('broadnews-social-contacts-title'); $this->select_fields = array('broadnews-select-background', 'broadnews-select-background-type'); $widget_ops = array( 'classname' => 'broadnews_social_contacts_widget aft-widget', 'description' => __('Displays social contacts lists from selected settings.', 'broadnews'), 'customize_selective_refresh' => false, ); parent::__construct('broadnews_social_contacts', __('AFTA Social Contacts', 'broadnews'), $widget_ops); } /** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { $instance = parent::broadnews_sanitize_data($instance, $instance); /** This filter is documented in wp-includes/default-widgets.php */ $broadnews_section_title = apply_filters('widget_title', $instance['broadnews-social-contacts-title'], $instance, $this->id_base); $broadnews_section_title = isset($broadnews_section_title) ? $broadnews_section_title : __('Connect with Us', 'broadnews'); // open the widget container echo $args['before_widget']; ?>
'aft-social-nav', 'link_before' => '', 'link_after' => '', )); } ?>

form_instance = $instance; // generate the text input for the title of the widget. Note that the first parameter matches text_fields array entry echo parent::broadnews_generate_text_input('broadnews-social-contacts-title', 'Title', 'Connect with Us'); } } endif;