Version Description
- Fixed youtube count to be fetched automatically using API v3
- Code cleanup done for shortcode
- Fixed small bug for facebook count on API limit reach response
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Counter for WordPress – AccessPress Social Counter |
Version | 1.3.9 |
Comparing to | |
See all releases |
Code changes from version 1.3.8 to 1.3.9
- accesspress-social-counter.php +31 -11
- images/promo-top.png +0 -0
- inc/backend/boards/about.php +1 -1
- inc/backend/boards/social-profiles.php +13 -6
- inc/frontend/shortcode.php +63 -176
- readme.txt +6 -1
accesspress-social-counter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: AccessPress Social Counter
|
4 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
|
5 |
* Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
|
6 |
-
* Version: 1.3.
|
7 |
* Author: AccessPress Themes
|
8 |
* Author URI: http://accesspressthemes.com
|
9 |
* Text Domain: aps-counter
|
@@ -24,7 +24,7 @@ if (!defined('SC_CSS_DIR')) {
|
|
24 |
define('SC_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
|
25 |
}
|
26 |
if (!defined('SC_VERSION')) {
|
27 |
-
define('SC_VERSION', '1.3.
|
28 |
}
|
29 |
/**
|
30 |
* Register of widgets
|
@@ -365,7 +365,13 @@ if (!class_exists('SC_Class')) {
|
|
365 |
// Facebook Response is in JSON
|
366 |
$response = file_get_contents($fqlURL);
|
367 |
$response = json_decode($response);
|
368 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
|
370 |
}
|
371 |
|
@@ -470,8 +476,29 @@ if (!class_exists('SC_Class')) {
|
|
470 |
break;
|
471 |
case 'youtube':
|
472 |
$social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
|
|
|
|
|
|
|
473 |
$count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
|
474 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
break;
|
476 |
case 'soundcloud':
|
477 |
$username = $apsc_settings['social_profile']['soundcloud']['username'];
|
@@ -580,10 +607,3 @@ if (!class_exists('SC_Class')) {
|
|
580 |
|
581 |
$sc_object = new SC_Class(); //initialization of plugin
|
582 |
}
|
583 |
-
add_action( 'wp_enqueue_scripts', 'remove_font_awesome', 99 );
|
584 |
-
|
585 |
-
function remove_font_awesome(){
|
586 |
-
wp_dequeue_style( 'apsc-font-awesome-css' );
|
587 |
-
}
|
588 |
-
|
589 |
-
remove_action('wp_enqueue_scripts', array('SC_Class', 'register_frontend_assets'),99);
|
3 |
* Plugin Name: AccessPress Social Counter
|
4 |
* Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-counter/
|
5 |
* Description: A plugin to display your social accounts fans, subscribers and followers number on your website with handful of backend settings and interface.
|
6 |
+
* Version: 1.3.9
|
7 |
* Author: AccessPress Themes
|
8 |
* Author URI: http://accesspressthemes.com
|
9 |
* Text Domain: aps-counter
|
24 |
define('SC_CSS_DIR', plugin_dir_url(__FILE__) . 'css');
|
25 |
}
|
26 |
if (!defined('SC_VERSION')) {
|
27 |
+
define('SC_VERSION', '1.3.9');
|
28 |
}
|
29 |
/**
|
30 |
* Register of widgets
|
365 |
// Facebook Response is in JSON
|
366 |
$response = file_get_contents($fqlURL);
|
367 |
$response = json_decode($response);
|
368 |
+
if(is_array($response) && isset($response[0]->like_count)){
|
369 |
+
return $response[0]->like_count;
|
370 |
+
}else{
|
371 |
+
$count = '0';
|
372 |
+
return $count;
|
373 |
+
}
|
374 |
+
|
375 |
|
376 |
}
|
377 |
|
476 |
break;
|
477 |
case 'youtube':
|
478 |
$social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
|
479 |
+
$count = get_transient('apsc_youtube');
|
480 |
+
|
481 |
+
if(false === $count){
|
482 |
$count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
|
483 |
+
if(
|
484 |
+
isset($apsc_settings['social_profile']['youtube']['channel_id'],$apsc_settings['social_profile']['youtube']['api_key']) &&
|
485 |
+
$apsc_settings['social_profile']['youtube']['channel_id']!='' && $apsc_settings['social_profile']['youtube']['api_key']
|
486 |
+
)
|
487 |
+
{
|
488 |
+
|
489 |
+
$api_key = $apsc_settings['social_profile']['youtube']['api_key'];
|
490 |
+
$channel_id = $apsc_settings['social_profile']['youtube']['channel_id'];
|
491 |
+
$api_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;
|
492 |
+
$connection = wp_remote_get($api_url, array('timeout'=>60));
|
493 |
+
if (!is_wp_error($connection)) {
|
494 |
+
$response = json_decode($connection['body'], true);
|
495 |
+
if (isset($response['items'][0]['statistics']['subscriberCount'])) {
|
496 |
+
$count = $response['items'][0]['statistics']['subscriberCount'];
|
497 |
+
set_transient('apsc_youtube',$count,$cache_period);
|
498 |
+
}
|
499 |
+
}
|
500 |
+
}
|
501 |
+
}
|
502 |
break;
|
503 |
case 'soundcloud':
|
504 |
$username = $apsc_settings['social_profile']['soundcloud']['username'];
|
607 |
|
608 |
$sc_object = new SC_Class(); //initialization of plugin
|
609 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
images/promo-top.png
CHANGED
Binary file
|
inc/backend/boards/about.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<div class="apsc-boards-tabs" id="apsc-board-about-settings" style="display: none;">
|
2 |
<div class="apsc-tab-wrapper">
|
3 |
-
|
4 |
|
5 |
<p>AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years. </p>
|
6 |
|
1 |
<div class="apsc-boards-tabs" id="apsc-board-about-settings" style="display: none;">
|
2 |
<div class="apsc-tab-wrapper">
|
3 |
+
<p><strong>AccessPress Social Counter </strong> - is a FREE WordPress Plugin by AccessPress Themes. </p>
|
4 |
|
5 |
<p>AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years. </p>
|
6 |
|
inc/backend/boards/social-profiles.php
CHANGED
@@ -143,7 +143,7 @@
|
|
143 |
<div class="apsc-option-outer-wrapper">
|
144 |
<h4><?php _e('Youtube', 'aps-counter') ?></h4>
|
145 |
<div class="apsc-extra-note">
|
146 |
-
<p><?php _e('Note:
|
147 |
</div>
|
148 |
<div class="apsc-option-inner-wrapper">
|
149 |
<label><?php _e('Display Counter', 'aps-counter') ?></label>
|
@@ -151,10 +151,10 @@
|
|
151 |
</div>
|
152 |
<div class="apsc-option-extra">
|
153 |
<div class="apsc-option-inner-wrapper">
|
154 |
-
<label><?php _e('Youtube
|
155 |
<div class="apsc-option-field">
|
156 |
-
<input type="text" name="social_profile[youtube][
|
157 |
-
<div class="apsc-option-note"><?php _e('Please enter the youtube username.
|
158 |
</div>
|
159 |
</div>
|
160 |
<div class="apsc-option-inner-wrapper">
|
@@ -165,10 +165,17 @@
|
|
165 |
</div>
|
166 |
</div>
|
167 |
<div class="apsc-option-inner-wrapper">
|
168 |
-
<label><?php _e('Youtube
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
<div class="apsc-option-field">
|
170 |
<input type="text" name="social_profile[youtube][subscribers_count]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['subscribers_count'])?esc_attr($apsc_settings['social_profile']['youtube']['subscribers_count']):0;?>"/>
|
171 |
-
<div class="apsc-option-note"><?php _e('Please enter total number of subscribers that your youtube channel has.', 'aps-counter'); ?></div>
|
172 |
</div>
|
173 |
</div>
|
174 |
</div>
|
143 |
<div class="apsc-option-outer-wrapper">
|
144 |
<h4><?php _e('Youtube', 'aps-counter') ?></h4>
|
145 |
<div class="apsc-extra-note">
|
146 |
+
<p><?php _e('Note: We have updated the functionality to work with youtube API v3 for automatic count update. So please fill the necessary credentials below.','aps-counter')?></p>
|
147 |
</div>
|
148 |
<div class="apsc-option-inner-wrapper">
|
149 |
<label><?php _e('Display Counter', 'aps-counter') ?></label>
|
151 |
</div>
|
152 |
<div class="apsc-option-extra">
|
153 |
<div class="apsc-option-inner-wrapper">
|
154 |
+
<label><?php _e('Youtube Channel ID', 'aps-counter'); ?></label>
|
155 |
<div class="apsc-option-field">
|
156 |
+
<input type="text" name="social_profile[youtube][channel_id]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['channel_id'])?esc_attr($apsc_settings['social_profile']['youtube']['channel_id']):'';?>"/>
|
157 |
+
<div class="apsc-option-note"><?php _e('Please enter the youtube channel ID.Your channel ID looks like: UC4WMyzBds5sSZcQxyAhxJ8g. And please note that your channel ID is different from username.Please go <a href="https://support.google.com/youtube/answer/3250431?hl=en" target="_blank">here</a> to know how to get your channel ID.', 'aps-counter'); ?></div>
|
158 |
</div>
|
159 |
</div>
|
160 |
<div class="apsc-option-inner-wrapper">
|
165 |
</div>
|
166 |
</div>
|
167 |
<div class="apsc-option-inner-wrapper">
|
168 |
+
<label><?php _e('Youtube API Key', 'aps-counter'); ?></label>
|
169 |
+
<div class="apsc-option-field">
|
170 |
+
<input type="text" name="social_profile[youtube][api_key]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['api_key'])?esc_attr($apsc_settings['social_profile']['youtube']['api_key']):'';?>"/>
|
171 |
+
<div class="apsc-option-note"><?php _e('To get your API Key, first create a project/app in <a href="https://console.developers.google.com/project" target="_blank">https://console.developers.google.com/project</a> and then turn on Youtube Analytics API from "APIs & auth >APIs inside your project.Then again go to "APIs & auth > APIs > Credentials > Public API access" and then click "CREATE A NEW KEY" button, select the "Browser key" option and click in the "CREATE" button, and then copy your API key and paste in above field.', 'aps-counter'); ?></div>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
<div class="apsc-option-inner-wrapper">
|
175 |
+
<label><?php _e('Default Subscribers Count', 'aps-counter'); ?></label>
|
176 |
<div class="apsc-option-field">
|
177 |
<input type="text" name="social_profile[youtube][subscribers_count]" value="<?php echo isset($apsc_settings['social_profile']['youtube']['subscribers_count'])?esc_attr($apsc_settings['social_profile']['youtube']['subscribers_count']):0;?>"/>
|
178 |
+
<div class="apsc-option-note"><?php _e('Please enter total number of subscribers that your youtube channel has in case the API fetching is failed for automatic update.', 'aps-counter'); ?></div>
|
179 |
</div>
|
180 |
</div>
|
181 |
</div>
|
inc/frontend/shortcode.php
CHANGED
@@ -14,220 +14,107 @@ $format = isset($apsc_settings['counter_format'])?$apsc_settings['counter_format
|
|
14 |
?>
|
15 |
<div class="apsc-each-profile">
|
16 |
<?php
|
|
|
|
|
17 |
switch ($social_profile) {
|
18 |
case 'facebook':
|
19 |
$facebook_page_id = $apsc_settings['social_profile']['facebook']['page_id'];
|
20 |
?>
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
$count = $this->facebook_count($api_url);
|
29 |
-
set_transient('apsc_facebook', $count, $cache_period);
|
30 |
-
|
31 |
-
} else {
|
32 |
-
$count = $facebook_count;
|
33 |
-
}
|
34 |
-
$default_count = isset($apsc_settings['social_profile']['facebook']['default_count'])?$apsc_settings['social_profile']['facebook']['default_count']:0;
|
35 |
-
$count = ($count==0)?$default_count:$count;
|
36 |
-
if($count!=0 || $count!=''){
|
37 |
-
set_transient('apsc_facebook',$count,$cache_period);
|
38 |
-
}
|
39 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
40 |
-
|
41 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Fans</span></div></a>
|
42 |
<?php
|
43 |
break;
|
44 |
case 'twitter':
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$count = $twitter_count;
|
54 |
-
}
|
55 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
56 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span></div></a><?php
|
57 |
break;
|
58 |
case 'googlePlus':
|
59 |
$social_profile_url = 'https://plus.google.com/' . $apsc_settings['social_profile']['googlePlus']['page_id'];
|
60 |
?>
|
61 |
-
<a class="apsc-google-plus-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank"
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
'timeout' => 60
|
69 |
-
);
|
70 |
-
$connection = wp_remote_get($api_url, $params);
|
71 |
-
|
72 |
-
if (is_wp_error($connection)) {
|
73 |
-
$count = 0;
|
74 |
-
} else {
|
75 |
-
$_data = json_decode($connection['body'], true);
|
76 |
-
|
77 |
-
if (isset($_data['circledByCount'])) {
|
78 |
-
$count = (intval($_data['circledByCount']));
|
79 |
-
set_transient('apsc_googlePlus', $count,$cache_period);
|
80 |
-
} else {
|
81 |
-
$count = 0;
|
82 |
-
}
|
83 |
-
}
|
84 |
-
} else {
|
85 |
-
$count = $googlePlus_count;
|
86 |
-
}
|
87 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
88 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span></div></a><?php
|
89 |
break;
|
90 |
case 'instagram':
|
91 |
$username = $apsc_settings['social_profile']['instagram']['username'];
|
92 |
$user_id = $apsc_settings['social_profile']['instagram']['user_id'];
|
93 |
$social_profile_url = 'https://instagram.com/' . $username;
|
94 |
?>
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
$api_url = 'https://api.instagram.com/v1/users/' . $user_id . '?access_token=' . $access_token;
|
102 |
-
$params = array(
|
103 |
-
'sslverify' => false,
|
104 |
-
'timeout' => 60
|
105 |
-
);
|
106 |
-
$connection = wp_remote_get($api_url, $params);
|
107 |
-
if (is_wp_error($connection)) {
|
108 |
-
$count = 0;
|
109 |
-
} else {
|
110 |
-
$response = json_decode($connection['body'], true);
|
111 |
-
if (
|
112 |
-
isset($response['meta']['code']) && 200 == $response['meta']['code'] && isset($response['data']['counts']['followed_by'])
|
113 |
-
) {
|
114 |
-
$count = (intval($response['data']['counts']['followed_by']));
|
115 |
-
set_transient('apsc_instagram',$count,$cache_period);
|
116 |
-
} else {
|
117 |
-
$count = 0;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
} else {
|
121 |
-
$count = $instagram_count;
|
122 |
-
}
|
123 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
124 |
-
?>
|
125 |
-
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span></div></a>
|
126 |
<?php
|
127 |
break;
|
128 |
case 'youtube':
|
129 |
$social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
|
130 |
?>
|
131 |
-
<a class="apsc-youtube-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank"
|
|
|
|
|
|
|
|
|
|
|
132 |
<?php
|
133 |
-
$youtube_count = $apsc_settings['social_profile']['youtube']['subscribers_count'];
|
134 |
-
$count = ($youtube_count!='')?$this->get_formatted_count($youtube_count,$format):0;
|
135 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Subscriber</span></div></a><?php
|
136 |
break;
|
137 |
case 'soundcloud':
|
138 |
$username = $apsc_settings['social_profile']['soundcloud']['username'];
|
139 |
$social_profile_url = 'https://soundcloud.com/' . $username;
|
140 |
?>
|
141 |
-
<a class="apsc-soundcloud-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank"
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
'timeout' => 60
|
149 |
-
);
|
150 |
-
|
151 |
-
$connection = wp_remote_get($api_url, $params);
|
152 |
-
if (is_wp_error($connection)) {
|
153 |
-
$count = 0;
|
154 |
-
} else {
|
155 |
-
$response = json_decode($connection['body'], true);
|
156 |
-
|
157 |
-
if (isset($response['followers_count'])) {
|
158 |
-
$count = (intval($response['followers_count']));
|
159 |
-
set_transient( 'apsc_soundcloud',$count,$cache_period );
|
160 |
-
} else {
|
161 |
-
$count = 0;
|
162 |
-
}
|
163 |
-
}
|
164 |
-
} else {
|
165 |
-
$count = $soundcloud_count;
|
166 |
-
}
|
167 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
168 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span></div></a><?php
|
169 |
break;
|
170 |
case 'dribbble':
|
171 |
$social_profile_url = 'http://dribbble.com/'.$apsc_settings['social_profile']['dribbble']['username'];
|
172 |
?>
|
173 |
-
<a class="apsc-dribble-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank"
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
'sslverify' => false,
|
181 |
-
'timeout' => 60
|
182 |
-
);
|
183 |
-
$connection = wp_remote_get($api_url, $params);
|
184 |
-
if (is_wp_error($connection)) {
|
185 |
-
$count = 0;
|
186 |
-
} else {
|
187 |
-
$response = json_decode($connection['body'], true);
|
188 |
-
if (isset($response['followers_count'])) {
|
189 |
-
$count = (intval($response['followers_count']));
|
190 |
-
set_transient('apsc_dribbble',$count,$cache_period );
|
191 |
-
} else {
|
192 |
-
$count = 0;
|
193 |
-
}
|
194 |
-
}
|
195 |
-
} else {
|
196 |
-
$count = $dribbble_count;
|
197 |
-
}
|
198 |
-
|
199 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
200 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span></div></a><?php
|
201 |
break;
|
202 |
case 'posts':
|
203 |
?>
|
204 |
-
<a class="apsc-edit-icon clearfix" href="javascript:void(0);"
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
} else {
|
212 |
-
$count = $posts_count;
|
213 |
-
}
|
214 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
215 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Post</span></div></a><?php
|
216 |
break;
|
217 |
case 'comments':
|
218 |
?>
|
219 |
-
<a class="apsc-comment-icon clearfix" href="javascript:void(0);"
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
} else {
|
227 |
-
$count = $comments_count;
|
228 |
-
}
|
229 |
-
$count = ($count!='')?$this->get_formatted_count($count,$format):0;
|
230 |
-
?><span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Comments</span></div></a><?php
|
231 |
break;
|
232 |
default:
|
233 |
break;
|
14 |
?>
|
15 |
<div class="apsc-each-profile">
|
16 |
<?php
|
17 |
+
$count = $this->get_count($social_profile);
|
18 |
+
$count = ($count!=0)?$this->get_formatted_count($count,$format):$count;
|
19 |
switch ($social_profile) {
|
20 |
case 'facebook':
|
21 |
$facebook_page_id = $apsc_settings['social_profile']['facebook']['page_id'];
|
22 |
?>
|
23 |
+
<a class="apsc-facebook-icon clearfix" href="<?php echo "http://facebook.com/" . $facebook_page_id; ?>" target="_blank">
|
24 |
+
<div class="apsc-inner-block">
|
25 |
+
<span class="social-icon"><i class="fa fa-facebook apsc-facebook"></i><span class="media-name">Facebook</span></span>
|
26 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Fans</span>
|
27 |
+
</div>
|
28 |
+
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
<?php
|
30 |
break;
|
31 |
case 'twitter':
|
32 |
+
?>
|
33 |
+
<a class="apsc-twitter-icon clearfix" href="<?php echo 'http://twitter.com/'.$apsc_settings['social_profile']['twitter']['username'];?>" target="_blank">
|
34 |
+
<div class="apsc-inner-block">
|
35 |
+
<span class="social-icon"><i class="fa fa-twitter apsc-twitter"></i><span class="media-name">Twitter</span></span>
|
36 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
37 |
+
</div>
|
38 |
+
</a>
|
39 |
+
<?php
|
|
|
|
|
|
|
|
|
40 |
break;
|
41 |
case 'googlePlus':
|
42 |
$social_profile_url = 'https://plus.google.com/' . $apsc_settings['social_profile']['googlePlus']['page_id'];
|
43 |
?>
|
44 |
+
<a class="apsc-google-plus-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank">
|
45 |
+
<div class="apsc-inner-block">
|
46 |
+
<span class="social-icon"><i class="apsc-googlePlus fa fa-google-plus"></i><span class="media-name">google+</span></span>
|
47 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
48 |
+
</div>
|
49 |
+
</a>
|
50 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
break;
|
52 |
case 'instagram':
|
53 |
$username = $apsc_settings['social_profile']['instagram']['username'];
|
54 |
$user_id = $apsc_settings['social_profile']['instagram']['user_id'];
|
55 |
$social_profile_url = 'https://instagram.com/' . $username;
|
56 |
?>
|
57 |
+
<a class="apsc-instagram-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank">
|
58 |
+
<div class="apsc-inner-block">
|
59 |
+
<span class="social-icon"><i class="apsc-instagram fa fa-instagram"></i><span class="media-name">Instagram</span></span>
|
60 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
61 |
+
</div>
|
62 |
+
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
<?php
|
64 |
break;
|
65 |
case 'youtube':
|
66 |
$social_profile_url = esc_url($apsc_settings['social_profile']['youtube']['channel_url']);
|
67 |
?>
|
68 |
+
<a class="apsc-youtube-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank">
|
69 |
+
<div class="apsc-inner-block">
|
70 |
+
<span class="social-icon"><i class="apsc-youtube fa fa-youtube"></i><span class="media-name">Youtube</span></span>
|
71 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Subscriber</span>
|
72 |
+
</div>
|
73 |
+
</a>
|
74 |
<?php
|
|
|
|
|
|
|
75 |
break;
|
76 |
case 'soundcloud':
|
77 |
$username = $apsc_settings['social_profile']['soundcloud']['username'];
|
78 |
$social_profile_url = 'https://soundcloud.com/' . $username;
|
79 |
?>
|
80 |
+
<a class="apsc-soundcloud-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank">
|
81 |
+
<div class="apsc-inner-block">
|
82 |
+
<span class="social-icon"><i class="apsc-soundcloud fa fa-soundcloud"></i><span class="media-name">Soundcloud</span></span>
|
83 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
84 |
+
</div>
|
85 |
+
</a>
|
86 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
break;
|
88 |
case 'dribbble':
|
89 |
$social_profile_url = 'http://dribbble.com/'.$apsc_settings['social_profile']['dribbble']['username'];
|
90 |
?>
|
91 |
+
<a class="apsc-dribble-icon clearfix" href="<?php echo $social_profile_url; ?>" target="_blank">
|
92 |
+
<div class="apsc-inner-block">
|
93 |
+
<span class="social-icon"><i class="apsc-dribbble fa fa-dribbble"></i><span class="media-name">dribble</span></span>
|
94 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Followers</span>
|
95 |
+
</div>
|
96 |
+
</a>
|
97 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
break;
|
99 |
case 'posts':
|
100 |
?>
|
101 |
+
<a class="apsc-edit-icon clearfix" href="javascript:void(0);">
|
102 |
+
<div class="apsc-inner-block">
|
103 |
+
<span class="social-icon"><i class="apsc-posts fa fa-edit"></i><span class="media-name">Post</span></span>
|
104 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Post</span>
|
105 |
+
</div>
|
106 |
+
</a>
|
107 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
108 |
break;
|
109 |
case 'comments':
|
110 |
?>
|
111 |
+
<a class="apsc-comment-icon clearfix" href="javascript:void(0);">
|
112 |
+
<div class="apsc-inner-block">
|
113 |
+
<span class="social-icon"><i class="apsc-comments fa fa-comments"></i><span class="media-name">Comment</span></span>
|
114 |
+
<span class="apsc-count"><?php echo $count; ?></span><span class="apsc-media-type">Comments</span>
|
115 |
+
</div>
|
116 |
+
</a>
|
117 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
118 |
break;
|
119 |
default:
|
120 |
break;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: social count, social counter, social counters, social media counters, soci
|
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -125,6 +125,11 @@ Once you install the plugin , you can check some general documentation about how
|
|
125 |
5. Backend Cache Settings Section
|
126 |
|
127 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
128 |
= 1.3.8 =
|
129 |
* Updated demo link
|
130 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.3
|
7 |
+
Stable tag: 1.3.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
125 |
5. Backend Cache Settings Section
|
126 |
|
127 |
== Changelog ==
|
128 |
+
= 1.3.9 =
|
129 |
+
* Fixed youtube count to be fetched automatically using API v3
|
130 |
+
* Code cleanup done for shortcode
|
131 |
+
* Fixed small bug for facebook count on API limit reach response
|
132 |
+
|
133 |
= 1.3.8 =
|
134 |
* Updated demo link
|
135 |
|