'barletta-social','description' => esc_html__( "Barletta Social Widget" ,'barletta') ); parent::__construct('barletta-social', esc_html__('Barletta Social Widget','barletta'), $widget_ops); } /** * Helper function that holds widget fields * Array is used in update and form functions */ private function widget_fields() { $fields = array( // Title 'widget_title' => array( 'barletta_widgets_name' => 'widget_title', 'barletta_widgets_title' => __( 'Title', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), // Other fields 'twitter' => array ( 'barletta_widgets_name' => 'twitter', 'barletta_widgets_title' => __( 'Twitter', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'facebook' => array ( 'barletta_widgets_name' => 'facebook', 'barletta_widgets_title' => __( 'Facebook', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'linkedin' => array ( 'barletta_widgets_name' => 'linkedin', 'barletta_widgets_title' => __( 'LinkedIn', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'google' => array ( 'barletta_widgets_name' => 'google', 'barletta_widgets_title' => __( 'Google+', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'pinterest' => array ( 'barletta_widgets_name' => 'pinterest', 'barletta_widgets_title' => __( 'Pinterest', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'youtube' => array ( 'barletta_widgets_name' => 'youtube', 'barletta_widgets_title' => __( 'YouTube', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'vimeo' => array ( 'barletta_widgets_name' => 'vimeo', 'barletta_widgets_title' => __( 'Vimeo', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'flickr' => array ( 'barletta_widgets_name' => 'flickr', 'barletta_widgets_title' => __( 'Flickr', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'dribbble' => array ( 'barletta_widgets_name' => 'dribbble', 'barletta_widgets_title' => __( 'Dribbble', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'tumblr' => array ( 'barletta_widgets_name' => 'tumblr', 'barletta_widgets_title' => __( 'Tumblr', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'instagram' => array ( 'barletta_widgets_name' => 'instagram', 'barletta_widgets_title' => __( 'Instagram', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'lastfm' => array ( 'barletta_widgets_name' => 'lastfm', 'barletta_widgets_title' => __( 'Last.fm', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), 'soundcloud' => array ( 'barletta_widgets_name' => 'soundcloud', 'barletta_widgets_title' => __( 'SoundCloud', 'barletta' ), 'barletta_widgets_field_type' => 'text' ), ); return $fields; } function widget($args , $instance) { extract($args); $widget_title = apply_filters('widget_title', $instance['title'] ); echo $before_widget; // Show title if( isset( $widget_title ) ) { echo force_balance_tags($before_title.$widget_title.$after_title); } /** * Widget Content */ ?>
'Follow Me', 'rss' => '', 'facebook' => '', 'twitter' => '', 'google' => '', 'pinterest' => '', 'instagram' => '', 'tumblr' => '', 'lastfm' => '', 'soundcloud' => '', 'dribbble' => '', 'youtube' => '', 'flickr' => ''); $instance = wp_parse_args( (array) $instance, $defaults ); ?>