/**
  * Return an instance of this class.
  *
  * @since	 1.0.0
  *
  * @return	object	A single instance of this class.
  */
 public static function get_instance()
 {
     // If the single instance hasn't been set, set it now.
     if (null == self::$instance) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 /**
  * Return shortcode markup for fan counts
  *
  * @since 	 1.0.0
  *
  * @return 	 shortcode markup
  */
 public function fan_counts($atts)
 {
     $defaults = array('networks' => '', 'rows' => '', 'skin' => '');
     $atts = shortcode_atts($defaults, $atts);
     $shortcode = '';
     $shortcode .= UltimateSocialDeuxFanCount::fan_count_output($atts['networks'], $atts['rows'], $atts['skin']);
     return $shortcode;
 }
 function widget($args, $instance)
 {
     extract($args);
     // these are the widget options
     $atts['facebook'] = !empty($instance['us_w_facebook']) ? 'facebook' : '';
     $atts['twitter'] = !empty($instance['us_w_twitter']) ? 'twitter' : '';
     $atts['google'] = !empty($instance['us_w_google']) ? 'google' : '';
     $atts['pinterest'] = !empty($instance['us_w_pinterest']) ? 'pinterest' : '';
     $atts['linkedin'] = !empty($instance['us_w_linkedin']) ? 'linkedin' : '';
     $atts['youtube'] = !empty($instance['us_w_youtube']) ? 'youtube' : '';
     $atts['vimeo'] = !empty($instance['us_w_vimeo']) ? 'vimeo' : '';
     $atts['dribbble'] = !empty($instance['us_w_dribbble']) ? 'dribbble' : '';
     $atts['behance'] = !empty($instance['us_w_behance']) ? 'behance' : '';
     $atts['delicious'] = !empty($instance['us_w_delicious']) ? 'delicious' : '';
     $atts['envato'] = !empty($instance['us_w_envato']) ? 'envato' : '';
     $atts['github'] = !empty($instance['us_w_github']) ? 'github' : '';
     $atts['soundcloud'] = !empty($instance['us_w_soundcloud']) ? 'soundcloud' : '';
     $atts['instagram'] = !empty($instance['us_w_instagram']) ? 'instagram' : '';
     $atts['vkontakte'] = !empty($instance['us_w_vkontakte']) ? 'vkontakte' : '';
     $atts['feedpress'] = !empty($instance['us_w_feedpress']) ? 'feedpress' : '';
     $atts['mailchimp'] = !empty($instance['us_w_mailchimp']) ? 'mailchimp' : '';
     $atts['flickr'] = !empty($instance['us_w_flickr']) ? 'flickr' : '';
     $atts['members'] = !empty($instance['us_w_members']) ? 'members' : '';
     $atts['posts'] = !empty($instance['us_w_posts']) ? 'posts' : '';
     $atts['comments'] = !empty($instance['us_w_comments']) ? 'comments' : '';
     $atts['love'] = !empty($instance['us_w_love']) ? 'love' : '';
     $skin = !empty($instance['us_w_skin']) ? $instance['us_w_skin'] : '';
     $rows = !empty($instance['us_w_rows']) ? $instance['us_w_rows'] : '1';
     $networks = '';
     foreach ($atts as &$network) {
         $networks .= $network . ',';
     }
     echo $before_widget;
     if (class_exists('UltimateSocialDeux')) {
         echo UltimateSocialDeuxFanCount::fan_count_output($networks, $rows, $skin);
     }
     echo $after_widget;
 }