Version Description
- Done the bug fixings for the AMP version removed the share icons from the amp version pages.
- Updated the fontawesome icons version to 4.7.0
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Share WordPress Plugin – AccessPress Social Share |
Version | 4.3.3 |
Comparing to | |
See all releases |
Code changes from version 4.3.2 to 4.3.3
- accesspress-social-share.php +30 -25
- inc/frontend/shortcode.php +293 -285
- readme.txt +5 -1
accesspress-social-share.php
CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
4 |
Plugin name: Social Share WordPress Plugin - AccessPress Social Share
|
5 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-share/
|
6 |
Description: A plugin to add various social media shares to a site with dynamic configuration options.
|
7 |
-
Version: 4.3.
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain: accesspress-social-share
|
@@ -30,7 +30,7 @@ if ( !defined( 'APSS_LANG_DIR' ) ) {
|
|
30 |
}
|
31 |
|
32 |
if ( !defined( 'APSS_VERSION' ) ) {
|
33 |
-
define( 'APSS_VERSION', '4.3.
|
34 |
}
|
35 |
|
36 |
if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
|
@@ -134,7 +134,7 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
134 |
* */
|
135 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'accesspress-social-share' ) {
|
136 |
wp_enqueue_style( 'aps-admin-css', APSS_CSS_DIR . '/backend.css', false, APSS_VERSION ); //registering plugin admin css
|
137 |
-
wp_enqueue_style( 'fontawesome-css', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.
|
138 |
|
139 |
/**
|
140 |
* Backend JS
|
@@ -188,10 +188,15 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
188 |
|
189 |
$is_default_archive = in_array( 'archives', $options['share_options'] );
|
190 |
$default_archives = ( ( is_archive() && !is_tax() ) && !is_category() ) && $is_default_archive ? true : false;
|
|
|
|
|
|
|
|
|
|
|
191 |
|
192 |
if ( empty( $options['share_options'] ) ) {
|
193 |
return $post_content;
|
194 |
-
} else if ( $is_lists_authorized || $is_attachement || $is_singular || $is_tax || $is_front_page || $default_category || $default_archives ) {
|
195 |
if ( $options['share_positions'] == 'below_content' ) {
|
196 |
return $post_content . "<div class='apss-social-share apss-theme-$icon_set_value clearfix' >" . $html_content . "</div>";
|
197 |
}
|
@@ -212,7 +217,7 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
212 |
* Registers Frontend Assets
|
213 |
* */
|
214 |
function register_frontend_assets() {
|
215 |
-
wp_enqueue_style( 'apss-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.
|
216 |
wp_enqueue_style( 'apss-font-opensans', '//fonts.googleapis.com/css?family=Open+Sans', array(), false );
|
217 |
wp_enqueue_style( 'apss-frontend-css', APSS_CSS_DIR . '/frontend.css', array( 'apss-font-awesome' ), APSS_VERSION );
|
218 |
wp_enqueue_script( 'apss-frontend-mainjs', APSS_JS_DIR . '/frontend.js', array( 'jquery' ), APSS_VERSION, true );
|
@@ -437,26 +442,26 @@ if ( !class_exists( 'APSS_Class' ) ) {
|
|
437 |
* Get Facebook Access Token
|
438 |
* */
|
439 |
function get_fb_access_token(){
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
}
|
461 |
|
462 |
function new_get_fb($url){
|
4 |
Plugin name: Social Share WordPress Plugin - AccessPress Social Share
|
5 |
Plugin URI: https://accesspressthemes.com/wordpress-plugins/accesspress-social-share/
|
6 |
Description: A plugin to add various social media shares to a site with dynamic configuration options.
|
7 |
+
Version: 4.3.3
|
8 |
Author: AccessPress Themes
|
9 |
Author URI: http://accesspressthemes.com
|
10 |
Text Domain: accesspress-social-share
|
30 |
}
|
31 |
|
32 |
if ( !defined( 'APSS_VERSION' ) ) {
|
33 |
+
define( 'APSS_VERSION', '4.3.3' );
|
34 |
}
|
35 |
|
36 |
if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
|
134 |
* */
|
135 |
if ( isset( $_GET['page'] ) && $_GET['page'] == 'accesspress-social-share' ) {
|
136 |
wp_enqueue_style( 'aps-admin-css', APSS_CSS_DIR . '/backend.css', false, APSS_VERSION ); //registering plugin admin css
|
137 |
+
wp_enqueue_style( 'fontawesome-css', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', false, APSS_VERSION );
|
138 |
|
139 |
/**
|
140 |
* Backend JS
|
188 |
|
189 |
$is_default_archive = in_array( 'archives', $options['share_options'] );
|
190 |
$default_archives = ( ( is_archive() && !is_tax() ) && !is_category() ) && $is_default_archive ? true : false;
|
191 |
+
if(function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()){
|
192 |
+
$show_icons = false;
|
193 |
+
}else {
|
194 |
+
$show_icons = true;
|
195 |
+
}
|
196 |
|
197 |
if ( empty( $options['share_options'] ) ) {
|
198 |
return $post_content;
|
199 |
+
} else if ( ($is_lists_authorized || $is_attachement || $is_singular || $is_tax || $is_front_page || $default_category || $default_archives) && $show_icons) {
|
200 |
if ( $options['share_positions'] == 'below_content' ) {
|
201 |
return $post_content . "<div class='apss-social-share apss-theme-$icon_set_value clearfix' >" . $html_content . "</div>";
|
202 |
}
|
217 |
* Registers Frontend Assets
|
218 |
* */
|
219 |
function register_frontend_assets() {
|
220 |
+
wp_enqueue_style( 'apss-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), APSS_VERSION );
|
221 |
wp_enqueue_style( 'apss-font-opensans', '//fonts.googleapis.com/css?family=Open+Sans', array(), false );
|
222 |
wp_enqueue_style( 'apss-frontend-css', APSS_CSS_DIR . '/frontend.css', array( 'apss-font-awesome' ), APSS_VERSION );
|
223 |
wp_enqueue_script( 'apss-frontend-mainjs', APSS_JS_DIR . '/frontend.js', array( 'jquery' ), APSS_VERSION, true );
|
442 |
* Get Facebook Access Token
|
443 |
* */
|
444 |
function get_fb_access_token(){
|
445 |
+
$apss_settings = $this->apss_settings;
|
446 |
+
$app_id = $apss_settings['api_configuration']['facebook']['app_id'];
|
447 |
+
$app_secret = $apss_settings['api_configuration']['facebook']['app_secret'];
|
448 |
+
$api_url = 'https://graph.facebook.com/';
|
449 |
+
$app_id= $apss_settings['api_configuration']['facebook']['app_id'];
|
450 |
+
$app_secret = $apss_settings['api_configuration']['facebook']['app_secret'];
|
451 |
+
$url = sprintf(
|
452 |
+
'%soauth/access_token?client_id=%s&client_secret=%s&grant_type=client_credentials',
|
453 |
+
$api_url,
|
454 |
+
$app_id ,
|
455 |
+
$app_secret
|
456 |
+
);
|
457 |
+
|
458 |
+
$access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
459 |
+
if ( is_wp_error( $access_token ) || ( isset( $access_token['response']['code'] ) && 200 != $access_token['response']['code'] ) ) {
|
460 |
+
return '';
|
461 |
+
} else {
|
462 |
+
$json_decode = json_decode($access_token['body']);
|
463 |
+
return sanitize_text_field( $json_decode->access_token );
|
464 |
+
}
|
465 |
}
|
466 |
|
467 |
function new_get_fb($url){
|
inc/frontend/shortcode.php
CHANGED
@@ -52,325 +52,333 @@ if ( isset( $attr['counter'] ) ) {
|
|
52 |
$counter_enable_options = 0;
|
53 |
}
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
-
<div class='apss-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
} else {
|
64 |
-
$excerpt = urlencode($content);
|
65 |
-
}
|
66 |
-
|
67 |
-
if ( isset( $attr['share_text'] ) && $attr['share_text'] != '' ) { ?> <div class='apss-share-text'><?php echo $attr['share_text']; ?></div> <?php } ?>
|
68 |
-
<?php
|
69 |
-
$total_count = 0;
|
70 |
-
foreach ( $options['social_networks'] as $key => $value ) {
|
71 |
-
if ( intval( $value ) == '1' ) {
|
72 |
-
$count = $this->get_count( $key, $url );
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
|
|
91 |
}
|
92 |
-
|
93 |
-
///////////////////////////////////////////
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
119 |
}
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
</div>
|
130 |
-
<?php
|
131 |
-
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
132 |
-
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
133 |
<?php
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
$url_twitter = $url;
|
143 |
-
$url_twitter = urlencode( $url_twitter );
|
144 |
-
if ( isset( $twitter_user ) && $twitter_user != '' ) {
|
145 |
-
$twitter_user = 'via=' . $twitter_user;
|
146 |
-
}
|
147 |
-
$link = "https://twitter.com/intent/tweet?text=$title&url=$url_twitter&$twitter_user";
|
148 |
-
$count = $this->get_count( $key, $url );
|
149 |
|
150 |
-
|
151 |
-
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
$flag=FALSE;
|
157 |
}
|
|
|
|
|
158 |
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
</
|
181 |
-
|
182 |
-
|
183 |
-
break;
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
|
|
207 |
}
|
208 |
-
|
209 |
-
///////////////////////////////////////////
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
<?php
|
220 |
-
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
221 |
-
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
222 |
<?php
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
|
|
|
|
|
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
|
|
249 |
}
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
</div>
|
260 |
-
<?php
|
261 |
-
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
262 |
-
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
263 |
<?php
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
|
|
|
|
|
|
269 |
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
|
|
291 |
}
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
</div>
|
301 |
|
302 |
-
<?php
|
303 |
-
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
304 |
-
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
305 |
<?php
|
306 |
-
|
|
|
|
|
|
|
307 |
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
|
|
361 |
}
|
362 |
}
|
363 |
-
}
|
364 |
|
365 |
-
|
366 |
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
</div>
|
|
|
|
|
|
52 |
$counter_enable_options = 0;
|
53 |
}
|
54 |
|
55 |
+
if(function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()){
|
56 |
+
$show_shortcode_content = false;
|
57 |
+
}else{
|
58 |
+
$show_shortcode_content = true;
|
59 |
+
}
|
60 |
+
if($show_shortcode_content){
|
61 |
?>
|
62 |
+
<div class='apss-social-share apss-theme-<?php echo $icon_set_value; ?> clearfix'>
|
63 |
+
<?php
|
64 |
+
$title = trim(str_replace( '+', '%20', urlencode( $post->post_title ) ));
|
65 |
+
$content = trim(strip_shortcodes( strip_tags( $post->post_content ) ));
|
66 |
+
if ( strlen( $content ) >= 100 ) {
|
67 |
+
$excerpt = urlencode(substr( $content, 0, 100 ) . '...');
|
68 |
+
} else {
|
69 |
+
$excerpt = urlencode($content);
|
70 |
+
}
|
71 |
|
72 |
+
if ( isset( $attr['share_text'] ) && $attr['share_text'] != '' ) { ?> <div class='apss-share-text'><?php echo $attr['share_text']; ?></div> <?php } ?>
|
73 |
+
<?php
|
74 |
+
$total_count = 0;
|
75 |
+
foreach ( $options['social_networks'] as $key => $value ) {
|
76 |
+
if ( intval( $value ) == '1' ) {
|
77 |
+
$count = $this->get_count( $key, $url );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
+
///////////////////////////////////////////
|
80 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
81 |
+
$url_check = parse_url($url);
|
82 |
+
if($url_check['scheme'] == 'https'){
|
83 |
+
$flag=TRUE;
|
84 |
+
}else{
|
85 |
+
$flag=FALSE;
|
86 |
+
}
|
87 |
|
88 |
+
if($flag == TRUE){
|
89 |
+
$url1 = APSS_Class:: get_http_url($url);
|
90 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
91 |
+
if($count != $http_count){
|
92 |
+
$count += $http_count;
|
93 |
+
}else{
|
94 |
+
$count = $count;
|
95 |
+
}
|
96 |
+
}
|
97 |
}
|
98 |
+
///////////////////////////////////////////
|
|
|
99 |
|
100 |
+
$total_count += $count;
|
101 |
+
switch ( $key ) {
|
102 |
+
//counter available for facebook
|
103 |
+
case 'facebook':
|
104 |
+
$link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
|
105 |
+
$count = $this->get_count( $key, $url );
|
106 |
|
107 |
+
////////////////////////////////////////
|
108 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
109 |
+
$url_check = parse_url($url);
|
110 |
+
if($url_check['scheme'] == 'https'){
|
111 |
+
$flag=TRUE;
|
112 |
+
}else{
|
113 |
+
$flag=FALSE;
|
114 |
+
}
|
115 |
|
116 |
+
if($flag == TRUE){
|
117 |
+
$url1 = APSS_Class:: get_http_url($url);
|
118 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
119 |
+
if($count != $http_count){
|
120 |
+
$count += $http_count;
|
121 |
+
}else{
|
122 |
+
$count = $count;
|
123 |
+
}
|
124 |
+
}
|
125 |
}
|
126 |
+
///////////////////////////////////////////
|
127 |
+
?>
|
128 |
+
<div class='apss-facebook apss-single-icon'>
|
129 |
+
<a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
|
130 |
+
<div class='apss-icon-block clearfix'>
|
131 |
+
<i class='fa fa-facebook'></i>
|
132 |
+
<span class='apss-social-text'><?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?></span>
|
133 |
+
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
134 |
+
</div>
|
|
|
|
|
|
|
|
|
135 |
<?php
|
136 |
+
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
137 |
+
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
138 |
+
<?php
|
139 |
+
} ?>
|
140 |
+
</a>
|
141 |
+
</div>
|
142 |
+
<?php
|
143 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
+
//counter available for twitter
|
146 |
+
case 'twitter':
|
147 |
+
$url_twitter = $url;
|
148 |
+
$url_twitter = urlencode( $url_twitter );
|
149 |
+
if ( isset( $twitter_user ) && $twitter_user != '' ) {
|
150 |
+
$twitter_user = 'via=' . $twitter_user;
|
|
|
151 |
}
|
152 |
+
$link = "https://twitter.com/intent/tweet?text=$title&url=$url_twitter&$twitter_user";
|
153 |
+
$count = $this->get_count( $key, $url );
|
154 |
|
155 |
+
////////////////////////////////////////
|
156 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
157 |
+
$url_check = parse_url($url);
|
158 |
+
if($url_check['scheme'] == 'https'){
|
159 |
+
$flag=TRUE;
|
160 |
+
}else{
|
161 |
+
$flag=FALSE;
|
162 |
+
}
|
163 |
+
|
164 |
+
if($flag == TRUE){
|
165 |
+
$url1 = APSS_Class:: get_http_url($url);
|
166 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
167 |
+
if($count != $http_count){
|
168 |
+
$count += $http_count;
|
169 |
+
}else{
|
170 |
+
$count = $count;
|
171 |
+
}
|
172 |
+
}
|
173 |
}
|
174 |
+
///////////////////////////////////////////
|
175 |
+
?>
|
176 |
+
<div class='apss-twitter apss-single-icon'>
|
177 |
+
<a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" href='javascript:void(0);' <?php }else{ ?> href="<?php echo $link; ?>" <?php } ?> title='<?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>'>
|
178 |
+
<div class='apss-icon-block clearfix'>
|
179 |
+
<i class='fa fa-twitter'></i>
|
180 |
+
<span class='apss-social-text'><?php _e( 'Share on Twitter', 'accesspress-social-share' ); ?></span><span class='apss-share'><?php _e( 'Tweet', 'accesspress-social-share' ); ?></span>
|
181 |
+
</div>
|
182 |
+
<?php if ( isset( $counter_enable_options ) && $counter_enable_options == '1' && $twitter_api_use !='1' ) { ?>
|
183 |
+
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
184 |
+
<?php } ?>
|
185 |
+
</a>
|
186 |
+
</div>
|
187 |
+
<?php
|
188 |
+
break;
|
|
|
189 |
|
190 |
+
//counter available for google plus
|
191 |
+
case 'google-plus':
|
192 |
+
$link = 'https://plus.google.com/share?url=' . $url;
|
193 |
+
$count = $this->get_count( $key, $url );
|
194 |
|
195 |
+
////////////////////////////////////////
|
196 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
197 |
+
$url_check = parse_url($url);
|
198 |
+
if($url_check['scheme'] == 'https'){
|
199 |
+
$flag=TRUE;
|
200 |
+
}else{
|
201 |
+
$flag=FALSE;
|
202 |
+
}
|
203 |
|
204 |
+
if($flag == TRUE){
|
205 |
+
$url1 = APSS_Class:: get_http_url($url);
|
206 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
207 |
+
if($count != $http_count){
|
208 |
+
$count += $http_count;
|
209 |
+
}else{
|
210 |
+
$count = $count;
|
211 |
+
}
|
212 |
+
}
|
213 |
}
|
214 |
+
///////////////////////////////////////////
|
|
|
215 |
|
216 |
+
?>
|
217 |
+
<div class='apss-google-plus apss-single-icon'>
|
218 |
+
<a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
|
219 |
+
<div class='apss-icon-block clearfix'>
|
220 |
+
<i class='fa fa-google-plus'></i>
|
221 |
+
<span class='apss-social-text'><?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?> </span>
|
222 |
+
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
223 |
+
</div>
|
|
|
|
|
|
|
224 |
<?php
|
225 |
+
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
226 |
+
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
227 |
+
<?php
|
228 |
+
} ?>
|
229 |
+
</a>
|
230 |
+
</div>
|
231 |
+
<?php
|
232 |
+
break;
|
233 |
|
234 |
+
//counter available for pinterest
|
235 |
+
case 'pinterest':
|
236 |
+
$count = $this->get_count( $key, $url );
|
237 |
+
////////////////////////////////////////
|
238 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
239 |
+
$url_check = parse_url($url);
|
240 |
+
if($url_check['scheme'] == 'https'){
|
241 |
+
$flag=TRUE;
|
242 |
+
}else{
|
243 |
+
$flag=FALSE;
|
244 |
+
}
|
245 |
|
246 |
+
if($flag == TRUE){
|
247 |
+
$url1 = APSS_Class:: get_http_url($url);
|
248 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
249 |
+
if($count != $http_count){
|
250 |
+
$count += $http_count;
|
251 |
+
}else{
|
252 |
+
$count = $count;
|
253 |
+
}
|
254 |
+
}
|
255 |
}
|
256 |
+
///////////////////////////////////////////
|
257 |
+
?>
|
258 |
+
<div class='apss-pinterest apss-single-icon'>
|
259 |
+
<a rel='nofollow' title='<?php _e( 'Share on Pinterest', 'accesspress-social-share' ); ?>' href='javascript:pinIt();'>
|
260 |
+
<div class='apss-icon-block clearfix'>
|
261 |
+
<i class='fa fa-pinterest'></i>
|
262 |
+
<span class='apss-social-text'><?php _e( 'Share on Pinterest', 'accesspress-social-share' ); ?></span>
|
263 |
+
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
264 |
+
</div>
|
|
|
|
|
|
|
|
|
265 |
<?php
|
266 |
+
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
267 |
+
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
268 |
+
<?php
|
269 |
+
} ?>
|
270 |
+
</a>
|
271 |
+
</div>
|
272 |
+
<?php
|
273 |
+
break;
|
274 |
|
275 |
+
//couter available for linkedin
|
276 |
+
case 'linkedin':
|
277 |
+
$link = "http://www.linkedin.com/shareArticle?mini=true&title=" . $title . "&url=" . $url . "&summary=" . $excerpt;
|
278 |
+
$count = $this->get_count( $key, $url );
|
279 |
+
////////////////////////////////////////
|
280 |
+
if(isset($http_url_checked) && $http_url_checked=='1'){
|
281 |
+
$url_check = parse_url($url);
|
282 |
+
if($url_check['scheme'] == 'https'){
|
283 |
+
$flag=TRUE;
|
284 |
+
}else{
|
285 |
+
$flag=FALSE;
|
286 |
+
}
|
287 |
|
288 |
+
if($flag == TRUE){
|
289 |
+
$url1 = APSS_Class:: get_http_url($url);
|
290 |
+
$http_count = APSS_Class:: get_count($key, $url1);
|
291 |
+
if($count != $http_count){
|
292 |
+
$count += $http_count;
|
293 |
+
}else{
|
294 |
+
$count = $count;
|
295 |
+
}
|
296 |
+
}
|
297 |
}
|
298 |
+
///////////////////////////////////////////
|
299 |
+
?>
|
300 |
+
<div class='apss-linkedin apss-single-icon'>
|
301 |
+
<a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
|
302 |
+
<div class='apss-icon-block clearfix'><i class='fa fa-linkedin'></i>
|
303 |
+
<span class='apss-social-text'><?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?></span>
|
304 |
+
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
305 |
+
</div>
|
|
|
306 |
|
|
|
|
|
|
|
307 |
<?php
|
308 |
+
if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
309 |
+
<div class='count apss-count' data-url='<?php echo $url; ?>' data-social-network='<?php echo $key; ?>' data-social-detail="<?php echo $url . '_' . $key; ?>"><?php echo $count; ?></div>
|
310 |
+
<?php
|
311 |
+
} ?>
|
312 |
|
313 |
+
</a>
|
314 |
+
</div>
|
315 |
+
<?php
|
316 |
+
break;
|
317 |
|
318 |
+
//there is no counter available for digg
|
319 |
+
case 'digg':
|
320 |
+
$link = "http://digg.com/submit?phase=2%20&url=" . $url . "&title=" . $title;
|
321 |
+
?>
|
322 |
+
<div class='apss-digg apss-single-icon'>
|
323 |
+
<a rel='nofollow' <?php if($apss_link_open_option_value == 2){ ?> onclick="apss_open_in_popup_window(event, '<?php echo $link; ?>');" <?php } ?> title='<?php _e( 'Share on Digg', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
|
324 |
+
<div class='apss-icon-block clearfix'>
|
325 |
+
<i class='fa fa-digg'></i>
|
326 |
+
<span class='apss-social-text'><?php _e( 'Share on Digg', 'accesspress-social-share' ); ?></span>
|
327 |
+
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
328 |
+
</div>
|
329 |
+
</a>
|
330 |
+
</div>
|
331 |
+
<?php
|
332 |
+
break;
|
333 |
|
334 |
+
case 'email':
|
335 |
+
if ( strpos( $options['apss_email_body'], '%%' ) || strpos( $options['apss_email_subject'], '%%' ) ) {
|
336 |
+
$link = 'mailto:?subject=' . $options['apss_email_subject'] . '&body=' . $options['apss_email_body'];
|
337 |
+
$link = preg_replace( array( '#%%title%%#', '#%%siteurl%%#', '#%%permalink%%#', '#%%url%%#' ), array( $title, get_site_url(), get_permalink(), $url ), $link );
|
338 |
+
} else {
|
339 |
+
$link = 'mailto:?subject=' . $options['apss_email_subject'] . '&body=' . $options['apss_email_body'] . ": " . $url;
|
340 |
+
}
|
341 |
+
?>
|
342 |
+
<div class='apss-email apss-single-icon'>
|
343 |
+
<a rel='nofollow' class='share-email-popup' title='<?php _e( 'Share it on Email', 'accesspress-social-share' ); ?>' target='<?php echo $apss_link_open_option; ?>' href='<?php echo $link; ?>'>
|
344 |
+
<div class='apss-icon-block clearfix'>
|
345 |
+
<i class='fa fa-envelope'></i>
|
346 |
+
<span class='apss-social-text'><?php _e( 'Send email', 'accesspress-social-share' ); ?></span>
|
347 |
+
<span class='apss-share'><?php _e( 'Mail', 'accesspress-social-share' ); ?></span>
|
348 |
+
</div>
|
349 |
+
</a>
|
350 |
+
</div>
|
351 |
+
<?php
|
352 |
+
break;
|
353 |
|
354 |
+
case 'print':
|
355 |
+
?>
|
356 |
+
<div class='apss-print apss-single-icon'>
|
357 |
+
<a rel='nofollow' title='<?php _e( 'Print', 'accesspress-social-share' ); ?>' href='javascript:void(0);' onclick='window.print(); return false;'>
|
358 |
+
<div class='apss-icon-block clearfix'><i class='fa fa-print'></i>
|
359 |
+
<span class='apss-social-text'><?php _e( 'Print', 'accesspress-social-share' ); ?></span>
|
360 |
+
<span class='apss-share'><?php _e( 'Print', 'accesspress-social-share' ); ?></span>
|
361 |
+
</div>
|
362 |
+
</a>
|
363 |
+
</div>
|
364 |
+
<?php
|
365 |
+
break;
|
366 |
+
}
|
367 |
}
|
368 |
}
|
|
|
369 |
|
370 |
+
do_action('apss_more_networks_in_shortcodes');
|
371 |
|
372 |
+
if ( isset( $total_counter_enable_options ) && $total_counter_enable_options == '1' ) {
|
373 |
+
?>
|
374 |
+
<div class='apss-total-share-count'>
|
375 |
+
<span class='apss-count-number'><?php echo $total_count; ?></span>
|
376 |
+
<div class="apss-total-shares"><span class='apss-total-text'><?php echo _e( ' Total', 'accesspress-social-share' ); ?></span>
|
377 |
+
<span class='apss-shares-text'><?php echo _e( ' Shares', 'accesspress-social-share' ); ?></span></div>
|
378 |
+
</div>
|
379 |
+
<?php
|
380 |
+
} ?>
|
381 |
+
</div>
|
382 |
+
<?php
|
383 |
+
}
|
384 |
+
?>
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: social share counter, social share, social media share, social network sha
|
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag: 4.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -145,6 +145,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
|
|
145 |
6. Backend Miscellaneous Settings Section
|
146 |
|
147 |
== Changelog ==
|
|
|
|
|
|
|
|
|
148 |
= 4.3.2 =
|
149 |
* Done the bug fixings for the facebook share counts using access token.
|
150 |
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 4.3.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
145 |
6. Backend Miscellaneous Settings Section
|
146 |
|
147 |
== Changelog ==
|
148 |
+
= 4.3.3 =
|
149 |
+
* Done the bug fixings for the AMP version removed the share icons from the amp version pages.
|
150 |
+
* Updated the fontawesome icons version to 4.7.0
|
151 |
+
|
152 |
= 4.3.2 =
|
153 |
* Done the bug fixings for the facebook share counts using access token.
|
154 |
|