Social Count Plus - Version 3.3.4

Version Description

  • 2016/06/18 =

  • Improved the widget styles, not forcing styles anymore (just select the color as empty). Thanks to Sinisa Nikolic.

  • Added social_count_plus_label filter.

Download this release

Release Info

Developer claudiosanches
Plugin Icon 128x128 Social Count Plus
Version 3.3.4
Comparing to
See all releases

Code changes from version 3.3.3 to 3.3.4

includes/abstracts/abstract-social-count-plus-counter.php CHANGED
@@ -60,23 +60,23 @@ abstract class Social_Count_Plus_Counter {
60
  /**
61
  * Get the li element.
62
  *
63
- * @param string $slug Item slug.
64
  * @param string $url Item url.
65
  * @param int $count Item count.
66
- * @param string $title Item title.
67
  * @param array $settings Item settings.
68
  *
69
  * @return string HTML li element.
70
  */
71
- protected function get_view_li( $slug, $url, $count, $title, $color, $settings ) {
72
  $target_blank = isset( $settings['target_blank'] ) ? ' target="_blank"' : '';
73
  $rel_nofollow = isset( $settings['rel_nofollow'] ) ? ' rel="nofollow"' : '';
 
74
 
75
- $html = sprintf( '<li class="count-%s">', $slug );
76
  $html .= sprintf( '<a class="icon" href="%s"%s%s></a>', esc_url( $url ), $target_blank, $rel_nofollow );
77
  $html .= '<span class="items">';
78
- $html .= sprintf( '<span class="count" style="color: %s !important;">%s</span>', $color, apply_filters( 'social_count_plus_number_format', $count ) );
79
- $html .= sprintf( '<span class="label" style="color: %s !important;">%s</span>', $color, $title );
80
  $html .= '</span>';
81
  $html .= '</li>';
82
 
60
  /**
61
  * Get the li element.
62
  *
 
63
  * @param string $url Item url.
64
  * @param int $count Item count.
65
+ * @param string $label Item label.
66
  * @param array $settings Item settings.
67
  *
68
  * @return string HTML li element.
69
  */
70
+ protected function get_view_li( $url, $count, $label, $color, $settings ) {
71
  $target_blank = isset( $settings['target_blank'] ) ? ' target="_blank"' : '';
72
  $rel_nofollow = isset( $settings['rel_nofollow'] ) ? ' rel="nofollow"' : '';
73
+ $styles = ! empty( $color ) ? ' style="color: ' . $color . ' !important;"' : '';
74
 
75
+ $html = sprintf( '<li class="count-%s">', $this->id );
76
  $html .= sprintf( '<a class="icon" href="%s"%s%s></a>', esc_url( $url ), $target_blank, $rel_nofollow );
77
  $html .= '<span class="items">';
78
+ $html .= sprintf( '<span class="count"%s>%s</span>', $styles, apply_filters( 'social_count_plus_number_format', $count ) );
79
+ $html .= sprintf( '<span class="label"%s>%s</span>', $styles, apply_filters( 'social_count_plus_label', $label, $this->id ) );
80
  $html .= '</span>';
81
  $html .= '</li>';
82
 
includes/counters/class-social-count-plus-comments-counter.php CHANGED
@@ -77,6 +77,6 @@ class Social_Count_Plus_Comments_Counter extends Social_Count_Plus_Counter {
77
  unset( $settings['target_blank'] );
78
  unset( $settings['rel_nofollow'] );
79
 
80
- return $this->get_view_li( $this->id, $url, $total, __( 'comments', 'social-count-plus' ), $text_color, $settings );
81
  }
82
  }
77
  unset( $settings['target_blank'] );
78
  unset( $settings['rel_nofollow'] );
79
 
80
+ return $this->get_view_li( $url, $total, __( 'comments', 'social-count-plus' ), $text_color, $settings );
81
  }
82
  }
includes/counters/class-social-count-plus-facebook-counter.php CHANGED
@@ -111,6 +111,6 @@ class Social_Count_Plus_Facebook_Counter extends Social_Count_Plus_Counter {
111
  public function get_view( $settings, $total, $text_color ) {
112
  $facebook_id = ! empty( $settings['facebook_id'] ) ? $settings['facebook_id'] : '';
113
 
114
- return $this->get_view_li( $this->id, 'https://www.facebook.com/' . $facebook_id, $total, __( 'likes', 'social-count-plus' ), $text_color, $settings );
115
  }
116
  }
111
  public function get_view( $settings, $total, $text_color ) {
112
  $facebook_id = ! empty( $settings['facebook_id'] ) ? $settings['facebook_id'] : '';
113
 
114
+ return $this->get_view_li( 'https://www.facebook.com/' . $facebook_id, $total, __( 'likes', 'social-count-plus' ), $text_color, $settings );
115
  }
116
  }
includes/counters/class-social-count-plus-github-counter.php CHANGED
@@ -80,6 +80,6 @@ class Social_Count_Plus_GitHub_Counter extends Social_Count_Plus_Counter {
80
  public function get_view( $settings, $total, $text_color ) {
81
  $github_username = ! empty( $settings['github_username'] ) ? $settings['github_username'] : '';
82
 
83
- return $this->get_view_li( $this->id, 'https://github.com/' . $github_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
80
  public function get_view( $settings, $total, $text_color ) {
81
  $github_username = ! empty( $settings['github_username'] ) ? $settings['github_username'] : '';
82
 
83
+ return $this->get_view_li( 'https://github.com/' . $github_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
includes/counters/class-social-count-plus-googleplus-counter.php CHANGED
@@ -80,6 +80,6 @@ class Social_Count_Plus_GooglePlus_Counter extends Social_Count_Plus_Counter {
80
  public function get_view( $settings, $total, $text_color ) {
81
  $googleplus_id = ! empty( $settings['googleplus_id'] ) ? $settings['googleplus_id'] : '';
82
 
83
- return $this->get_view_li( $this->id, 'https://plus.google.com/' . $googleplus_id, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
80
  public function get_view( $settings, $total, $text_color ) {
81
  $googleplus_id = ! empty( $settings['googleplus_id'] ) ? $settings['googleplus_id'] : '';
82
 
83
+ return $this->get_view_li( 'https://plus.google.com/' . $googleplus_id, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
includes/counters/class-social-count-plus-instagram-counter.php CHANGED
@@ -84,6 +84,6 @@ class Social_Count_Plus_Instagram_Counter extends Social_Count_Plus_Counter {
84
  public function get_view( $settings, $total, $text_color ) {
85
  $instagram_username = ! empty( $settings['instagram_username'] ) ? $settings['instagram_username'] : '';
86
 
87
- return $this->get_view_li( $this->id, 'https://instagram.com/' . $instagram_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
88
  }
89
  }
84
  public function get_view( $settings, $total, $text_color ) {
85
  $instagram_username = ! empty( $settings['instagram_username'] ) ? $settings['instagram_username'] : '';
86
 
87
+ return $this->get_view_li( 'https://instagram.com/' . $instagram_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
88
  }
89
  }
includes/counters/class-social-count-plus-linkedin-counter.php CHANGED
@@ -85,6 +85,6 @@ class Social_Count_Plus_LinkedIn_Counter extends Social_Count_Plus_Counter {
85
  public function get_view( $settings, $total, $text_color ) {
86
  $linkedin_company_id = ! empty( $settings['linkedin_company_id'] ) ? $settings['linkedin_company_id'] : '';
87
 
88
- return $this->get_view_li( $this->id, 'https://www.linkedin.com/company/' . $linkedin_company_id, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
89
  }
90
  }
85
  public function get_view( $settings, $total, $text_color ) {
86
  $linkedin_company_id = ! empty( $settings['linkedin_company_id'] ) ? $settings['linkedin_company_id'] : '';
87
 
88
+ return $this->get_view_li( 'https://www.linkedin.com/company/' . $linkedin_company_id, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
89
  }
90
  }
includes/counters/class-social-count-plus-pinterest-counter.php CHANGED
@@ -89,6 +89,6 @@ class Social_Count_Plus_Pinterest_Counter extends Social_Count_Plus_Counter {
89
  public function get_view( $settings, $total, $text_color ) {
90
  $pinterest_username = ! empty( $settings['pinterest_username'] ) ? $settings['pinterest_username'] : '';
91
 
92
- return $this->get_view_li( $this->id, 'https://www.pinterest.com/' . $pinterest_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
93
  }
94
  }
89
  public function get_view( $settings, $total, $text_color ) {
90
  $pinterest_username = ! empty( $settings['pinterest_username'] ) ? $settings['pinterest_username'] : '';
91
 
92
+ return $this->get_view_li( 'https://www.pinterest.com/' . $pinterest_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
93
  }
94
  }
includes/counters/class-social-count-plus-posts-counter.php CHANGED
@@ -80,6 +80,6 @@ class Social_Count_Plus_Posts_Counter extends Social_Count_Plus_Counter {
80
  unset( $settings['target_blank'] );
81
  unset( $settings['rel_nofollow'] );
82
 
83
- return $this->get_view_li( $this->id, $url, $total, strtolower( $post_object->label ), $text_color, $settings );
84
  }
85
  }
80
  unset( $settings['target_blank'] );
81
  unset( $settings['rel_nofollow'] );
82
 
83
+ return $this->get_view_li( $url, $total, strtolower( $post_object->label ), $text_color, $settings );
84
  }
85
  }
includes/counters/class-social-count-plus-soundcloud-counter.php CHANGED
@@ -80,6 +80,6 @@ class Social_Count_Plus_SoundCloud_Counter extends Social_Count_Plus_Counter {
80
  public function get_view( $settings, $total, $text_color ) {
81
  $soundcloud_username = ! empty( $settings['soundcloud_username'] ) ? $settings['soundcloud_username'] : '';
82
 
83
- return $this->get_view_li( $this->id, 'https://soundcloud.com/' . $soundcloud_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
80
  public function get_view( $settings, $total, $text_color ) {
81
  $soundcloud_username = ! empty( $settings['soundcloud_username'] ) ? $settings['soundcloud_username'] : '';
82
 
83
+ return $this->get_view_li( 'https://soundcloud.com/' . $soundcloud_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
includes/counters/class-social-count-plus-steam-counter.php CHANGED
@@ -79,6 +79,6 @@ class Social_Count_Plus_Steam_Counter extends Social_Count_Plus_Counter {
79
  public function get_view( $settings, $total, $text_color ) {
80
  $steam_group_name = ! empty( $settings['steam_group_name'] ) ? $settings['steam_group_name'] : '';
81
 
82
- return $this->get_view_li( $this->id, 'https://steamcommunity.com/groups/' . $steam_group_name, $total, __( 'members', 'social-count-plus' ), $text_color, $settings );
83
  }
84
  }
79
  public function get_view( $settings, $total, $text_color ) {
80
  $steam_group_name = ! empty( $settings['steam_group_name'] ) ? $settings['steam_group_name'] : '';
81
 
82
+ return $this->get_view_li( 'https://steamcommunity.com/groups/' . $steam_group_name, $total, __( 'members', 'social-count-plus' ), $text_color, $settings );
83
  }
84
  }
includes/counters/class-social-count-plus-tumblr-counter.php CHANGED
@@ -184,6 +184,6 @@ class Social_Count_Plus_Tumblr_Counter extends Social_Count_Plus_Counter {
184
  public function get_view( $settings, $total, $text_color ) {
185
  $tumblr_hostname = ! empty( $settings['tumblr_hostname'] ) ? $settings['tumblr_hostname'] : '';
186
 
187
- return $this->get_view_li( $this->id, $tumblr_hostname, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
188
  }
189
  }
184
  public function get_view( $settings, $total, $text_color ) {
185
  $tumblr_hostname = ! empty( $settings['tumblr_hostname'] ) ? $settings['tumblr_hostname'] : '';
186
 
187
+ return $this->get_view_li( $tumblr_hostname, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
188
  }
189
  }
includes/counters/class-social-count-plus-twitch-counter.php CHANGED
@@ -87,6 +87,6 @@ class Social_Count_Plus_Twitch_Counter extends Social_Count_Plus_Counter {
87
  public function get_view( $settings, $total, $text_color ) {
88
  $twitch_username = ! empty( $settings['twitch_username'] ) ? $settings['twitch_username'] : '';
89
 
90
- return $this->get_view_li( $this->id, 'http://www.twitch.tv/' . $twitch_username . '/profile', $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
91
  }
92
  }
87
  public function get_view( $settings, $total, $text_color ) {
88
  $twitch_username = ! empty( $settings['twitch_username'] ) ? $settings['twitch_username'] : '';
89
 
90
+ return $this->get_view_li( 'http://www.twitch.tv/' . $twitch_username . '/profile', $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
91
  }
92
  }
includes/counters/class-social-count-plus-twitter-counter.php CHANGED
@@ -185,6 +185,6 @@ class Social_Count_Plus_Twitter_Counter extends Social_Count_Plus_Counter {
185
  public function get_view( $settings, $total, $text_color ) {
186
  $twitter_user = ! empty( $settings['twitter_user'] ) ? $settings['twitter_user'] : '';
187
 
188
- return $this->get_view_li( $this->id, 'https://twitter.com/' . $twitter_user, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
189
  }
190
  }
185
  public function get_view( $settings, $total, $text_color ) {
186
  $twitter_user = ! empty( $settings['twitter_user'] ) ? $settings['twitter_user'] : '';
187
 
188
+ return $this->get_view_li( 'https://twitter.com/' . $twitter_user, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
189
  }
190
  }
includes/counters/class-social-count-plus-users-counter.php CHANGED
@@ -78,6 +78,6 @@ class Social_Count_Plus_Users_Counter extends Social_Count_Plus_Counter {
78
  unset( $settings['target_blank'] );
79
  unset( $settings['rel_nofollow'] );
80
 
81
- return $this->get_view_li( $this->id, $url, $total, $label, $text_color, $settings );
82
  }
83
  }
78
  unset( $settings['target_blank'] );
79
  unset( $settings['rel_nofollow'] );
80
 
81
+ return $this->get_view_li( $url, $total, $label, $text_color, $settings );
82
  }
83
  }
includes/counters/class-social-count-plus-vimeo-counter.php CHANGED
@@ -80,6 +80,6 @@ class Social_Count_Plus_Vimeo_Counter extends Social_Count_Plus_Counter {
80
  public function get_view( $settings, $total, $text_color ) {
81
  $vimeo_username = ! empty( $settings['vimeo_username'] ) ? $settings['vimeo_username'] : '';
82
 
83
- return $this->get_view_li( $this->id, 'https://vimeo.com/' . $vimeo_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
80
  public function get_view( $settings, $total, $text_color ) {
81
  $vimeo_username = ! empty( $settings['vimeo_username'] ) ? $settings['vimeo_username'] : '';
82
 
83
+ return $this->get_view_li( 'https://vimeo.com/' . $vimeo_username, $total, __( 'followers', 'social-count-plus' ), $text_color, $settings );
84
  }
85
  }
includes/counters/class-social-count-plus-youtube-counter.php CHANGED
@@ -87,6 +87,6 @@ class Social_Count_Plus_YouTube_Counter extends Social_Count_Plus_Counter {
87
  public function get_view( $settings, $total, $text_color ) {
88
  $youtube_url = ! empty( $settings['youtube_url'] ) ? $settings['youtube_url'] : '';
89
 
90
- return $this->get_view_li( $this->id, $youtube_url, $total, __( 'subscribers', 'social-count-plus' ), $text_color, $settings );
91
  }
92
  }
87
  public function get_view( $settings, $total, $text_color ) {
88
  $youtube_url = ! empty( $settings['youtube_url'] ) ? $settings['youtube_url'] : '';
89
 
90
+ return $this->get_view_li( $youtube_url, $total, __( 'subscribers', 'social-count-plus' ), $text_color, $settings );
91
  }
92
  }
languages/social-count-plus.pot CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2015 Claudio Sanches
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Social Count Plus 3.3.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/plugins/woocommerce-domination/\n"
7
- "POT-Creation-Date: 2015-12-22 18:42:51+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
14
  "X-Generator: grunt-wp-i18n 0.5.3\n"
1
+ # Copyright (C) 2016 Claudio Sanches
2
  # This file is distributed under the GPLv2 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Social Count Plus 3.3.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/plugins/woocommerce-domination/\n"
7
+ "POT-Creation-Date: 2016-06-18 09:55:50+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
14
  "X-Generator: grunt-wp-i18n 0.5.3\n"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: counter, widget, shortcode, facebook, github, googleplus, instagram, linkedin, pinterest, soundcloud, steam, tumblr, twitch, twitter, vimeo, youtube
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
- Stable tag: 3.3.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -178,6 +178,11 @@ Copy the report file content and paste it in [gist.github.com](https://gist.gith
178
 
179
  == Changelog ==
180
 
 
 
 
 
 
181
  = 3.3.3 - 2016/04/26 =
182
 
183
  * Updated the Facebook API to support APPs v2.5 or later.
@@ -197,6 +202,7 @@ Copy the report file content and paste it in [gist.github.com](https://gist.gith
197
 
198
  == Upgrade Notice ==
199
 
200
- = 3.3.3 =
201
 
202
- * Updated the Facebook API to support APPs v2.5 or later.
 
4
  Tags: counter, widget, shortcode, facebook, github, googleplus, instagram, linkedin, pinterest, soundcloud, steam, tumblr, twitch, twitter, vimeo, youtube
5
  Requires at least: 4.0
6
  Tested up to: 4.5
7
+ Stable tag: 3.3.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
178
 
179
  == Changelog ==
180
 
181
+ = 3.3.4 - 2016/06/18 =
182
+
183
+ * Improved the widget styles, not forcing styles anymore (just select the color as empty). Thanks to Sinisa Nikolic.
184
+ * Added `social_count_plus_label` filter.
185
+
186
  = 3.3.3 - 2016/04/26 =
187
 
188
  * Updated the Facebook API to support APPs v2.5 or later.
202
 
203
  == Upgrade Notice ==
204
 
205
+ = 3.3.4 =
206
 
207
+ * Improved the widget styles, not forcing styles anymore (just select the color as empty). Thanks to Sinisa Nikolic.
208
+ * Added `social_count_plus_label` filter.
social-count-plus.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: Displays your numbers in Facebook, GitHub, Google+, Instagram, LinkedIn, Pinterest, SoundCloud, Steam Community, Tumblr, Twitch, Twitter, Vimeo, Youtube, posts, comments and users.
6
  * Author: Claudio Sanches
7
  * Author URI: http://claudiosmweb.com/
8
- * Version: 3.3.3
9
  * License: GPLv2 or later
10
  * Text Domain: social-count-plus
11
  * Domain Path: /languages/
@@ -31,7 +31,7 @@ class Social_Count_Plus {
31
  *
32
  * @var string
33
  */
34
- const VERSION = '3.3.3';
35
 
36
  /**
37
  * Instance of this class.
5
  * Description: Displays your numbers in Facebook, GitHub, Google+, Instagram, LinkedIn, Pinterest, SoundCloud, Steam Community, Tumblr, Twitch, Twitter, Vimeo, Youtube, posts, comments and users.
6
  * Author: Claudio Sanches
7
  * Author URI: http://claudiosmweb.com/
8
+ * Version: 3.3.4
9
  * License: GPLv2 or later
10
  * Text Domain: social-count-plus
11
  * Domain Path: /languages/
31
  *
32
  * @var string
33
  */
34
+ const VERSION = '3.3.4';
35
 
36
  /**
37
  * Instance of this class.