Version Description
- Refinement in the code
- Checked plugin compactibility with wordpress version 5.2x
Download this release
Release Info
Developer | Access Keys |
Plugin | Social Share WordPress Plugin – AccessPress Social Share |
Version | 4.4.4 |
Comparing to | |
See all releases |
Code changes from version 4.4.2 to 4.4.4
- accesspress-social-share.php +4 -31
- inc/backend/about-apss.php +0 -5
- inc/backend/activation.php +0 -1
- inc/backend/main-page.php +1 -10
- inc/backend/save-settings.php +1 -2
- inc/frontend/content-filter.php +22 -39
- inc/frontend/shortcode.php +9 -44
- readme.txt +8 -3
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 (Tester)
|
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.4.
|
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.4.
|
34 |
}
|
35 |
|
36 |
if ( ! defined( 'APSS_TEXT_DOMAIN' ) ) {
|
@@ -392,17 +392,14 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
392 |
echo "</pre>";
|
393 |
}
|
394 |
|
395 |
-
////////////////////////////////////for count
|
396 |
//for facebook url share count
|
397 |
function get_fb( $url ){
|
398 |
$apss_settings = $this -> apss_settings;
|
399 |
if ( ! isset( $apss_settings[ 'enable_cache' ] ) || $apss_settings[ 'enable_cache' ] == '1' ) {
|
400 |
-
////////////////////////for transient//////////////////////////////
|
401 |
$cache_period = $apss_settings[ 'cache_period' ];
|
402 |
$fb_transient = 'fb_' . md5( $url );
|
403 |
$fb_transient_count = get_transient( $fb_transient );
|
404 |
-
|
405 |
-
//for setting the counter transient in separate options value
|
406 |
$apss_social_counts_transients = get_option( APSS_COUNT_TRANSIENTS );
|
407 |
if ( false === $fb_transient_count ) {
|
408 |
$json_string = $this -> get_json_values( 'https://graph.facebook.com/?id=' . $url );
|
@@ -416,14 +413,10 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
416 |
} else {
|
417 |
$facebook_count = $fb_transient_count;
|
418 |
}
|
419 |
-
|
420 |
} else {
|
421 |
$json_string = $this -> get_json_values( 'https://graph.facebook.com/?id=' . $url );
|
422 |
$json = json_decode( $json_string, true );
|
423 |
-
|
424 |
-
// echo"<pre>";
|
425 |
-
// print_r($json);
|
426 |
-
// echo"</pre>";
|
427 |
$facebook_count = isset( $json[ 'share' ][ 'share_count' ] ) ? intval( $json[ 'share' ][ 'share_count' ] ) : 0;
|
428 |
}
|
429 |
return $facebook_count;
|
@@ -434,11 +427,6 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
434 |
* */
|
435 |
function get_fb_access_token(){
|
436 |
$apss_settings = $this -> apss_settings;
|
437 |
-
|
438 |
-
// echo"<pre>";
|
439 |
-
// print_r($apss_settings);
|
440 |
-
// echo"</pre>";
|
441 |
-
|
442 |
$app_id = $apss_settings[ 'api_configuration' ][ 'facebook' ][ 'app_id' ];
|
443 |
$app_secret = $apss_settings[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ];
|
444 |
$api_url = 'https://graph.facebook.com/';
|
@@ -447,16 +435,10 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
447 |
);
|
448 |
|
449 |
$access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
450 |
-
// echo "Access Token:"
|
451 |
-
// echo"<pre>";
|
452 |
-
// print_r($access_token);
|
453 |
-
// echo"</pre>";
|
454 |
if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
|
455 |
-
//echo 1;
|
456 |
return '';
|
457 |
} else {
|
458 |
$json_decode = json_decode( $access_token[ 'body' ] );
|
459 |
-
//echo 2;
|
460 |
return sanitize_text_field( $json_decode -> access_token );
|
461 |
}
|
462 |
}
|
@@ -486,7 +468,6 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
486 |
|
487 |
$apss_settings = $this -> apss_settings;
|
488 |
if ( isset( $apss_settings[ 'enable_cache' ] ) && $apss_settings[ 'enable_cache' ] == '1' ) {
|
489 |
-
////////////////////////for transient//////////////////////////////
|
490 |
$cache_period = $apss_settings[ 'cache_period' ];
|
491 |
$fb_transient = 'fb_' . md5( $url );
|
492 |
$fb_transient_count = get_transient( $fb_transient );
|
@@ -505,13 +486,9 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
505 |
} else {
|
506 |
$facebook_count = $fb_transient_count;
|
507 |
}
|
508 |
-
////////////////////////for transient ends ///////////////////////////
|
509 |
} else {
|
510 |
$json_string = $this -> get_json_values( $facebook_count );
|
511 |
$json = json_decode( $json_string, true );
|
512 |
-
// echo"<pre>";
|
513 |
-
// print_r($json);
|
514 |
-
// echo"</pre>";
|
515 |
$facebook_count = isset( $json[ 'share' ][ 'share_count' ] ) ? intval( $json[ 'share' ][ 'share_count' ] ) : 0 ;
|
516 |
}
|
517 |
return $facebook_count;
|
@@ -732,10 +709,6 @@ if ( ! class_exists( 'APSS_Class' ) ) {
|
|
732 |
public static function get_http_url( $url ){
|
733 |
return preg_replace( '/https:/i', 'http:', $url );
|
734 |
}
|
735 |
-
|
736 |
}
|
737 |
-
|
738 |
-
//APSS_Class termination
|
739 |
-
|
740 |
$GLOBALS[ 'apss_object' ] = new APSS_Class();
|
741 |
}
|
4 |
Plugin name: Social Share WordPress Plugin - AccessPress Social Share (Tester)
|
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.4.4
|
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.4.4' );
|
34 |
}
|
35 |
|
36 |
if ( ! defined( 'APSS_TEXT_DOMAIN' ) ) {
|
392 |
echo "</pre>";
|
393 |
}
|
394 |
|
395 |
+
//////////////////////////////////// for count //////////////////////////////////////
|
396 |
//for facebook url share count
|
397 |
function get_fb( $url ){
|
398 |
$apss_settings = $this -> apss_settings;
|
399 |
if ( ! isset( $apss_settings[ 'enable_cache' ] ) || $apss_settings[ 'enable_cache' ] == '1' ) {
|
|
|
400 |
$cache_period = $apss_settings[ 'cache_period' ];
|
401 |
$fb_transient = 'fb_' . md5( $url );
|
402 |
$fb_transient_count = get_transient( $fb_transient );
|
|
|
|
|
403 |
$apss_social_counts_transients = get_option( APSS_COUNT_TRANSIENTS );
|
404 |
if ( false === $fb_transient_count ) {
|
405 |
$json_string = $this -> get_json_values( 'https://graph.facebook.com/?id=' . $url );
|
413 |
} else {
|
414 |
$facebook_count = $fb_transient_count;
|
415 |
}
|
416 |
+
|
417 |
} else {
|
418 |
$json_string = $this -> get_json_values( 'https://graph.facebook.com/?id=' . $url );
|
419 |
$json = json_decode( $json_string, true );
|
|
|
|
|
|
|
|
|
420 |
$facebook_count = isset( $json[ 'share' ][ 'share_count' ] ) ? intval( $json[ 'share' ][ 'share_count' ] ) : 0;
|
421 |
}
|
422 |
return $facebook_count;
|
427 |
* */
|
428 |
function get_fb_access_token(){
|
429 |
$apss_settings = $this -> apss_settings;
|
|
|
|
|
|
|
|
|
|
|
430 |
$app_id = $apss_settings[ 'api_configuration' ][ 'facebook' ][ 'app_id' ];
|
431 |
$app_secret = $apss_settings[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ];
|
432 |
$api_url = 'https://graph.facebook.com/';
|
435 |
);
|
436 |
|
437 |
$access_token = wp_remote_get( $url, array( 'timeout' => 60 ) );
|
|
|
|
|
|
|
|
|
438 |
if ( is_wp_error( $access_token ) || ( isset( $access_token[ 'response' ][ 'code' ] ) && 200 != $access_token[ 'response' ][ 'code' ] ) ) {
|
|
|
439 |
return '';
|
440 |
} else {
|
441 |
$json_decode = json_decode( $access_token[ 'body' ] );
|
|
|
442 |
return sanitize_text_field( $json_decode -> access_token );
|
443 |
}
|
444 |
}
|
468 |
|
469 |
$apss_settings = $this -> apss_settings;
|
470 |
if ( isset( $apss_settings[ 'enable_cache' ] ) && $apss_settings[ 'enable_cache' ] == '1' ) {
|
|
|
471 |
$cache_period = $apss_settings[ 'cache_period' ];
|
472 |
$fb_transient = 'fb_' . md5( $url );
|
473 |
$fb_transient_count = get_transient( $fb_transient );
|
486 |
} else {
|
487 |
$facebook_count = $fb_transient_count;
|
488 |
}
|
|
|
489 |
} else {
|
490 |
$json_string = $this -> get_json_values( $facebook_count );
|
491 |
$json = json_decode( $json_string, true );
|
|
|
|
|
|
|
492 |
$facebook_count = isset( $json[ 'share' ][ 'share_count' ] ) ? intval( $json[ 'share' ][ 'share_count' ] ) : 0 ;
|
493 |
}
|
494 |
return $facebook_count;
|
709 |
public static function get_http_url( $url ){
|
710 |
return preg_replace( '/https:/i', 'http:', $url );
|
711 |
}
|
|
|
712 |
}
|
|
|
|
|
|
|
713 |
$GLOBALS[ 'apss_object' ] = new APSS_Class();
|
714 |
}
|
inc/backend/about-apss.php
CHANGED
@@ -2,9 +2,7 @@
|
|
2 |
<h2><?php _e( 'About Us', 'accesspress-social-share' ); ?></h2>
|
3 |
<div class="ap-tab-wrapper">
|
4 |
<p><strong><?php _e( 'AccessPress Social Share', 'accesspress-social-share' ); ?></strong> - <?php _e( 'is a FREE WordPress Plugin by AccessPress Themes.', 'accesspress-social-share' ); ?></p>
|
5 |
-
|
6 |
<p><?php _e( 'AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years.', 'accesspress-social-share' ); ?> </p>
|
7 |
-
|
8 |
<p><strong>AccessPress Social Share</strong> - <?php _e( 'is plugin to allow anyone easily share website content (pages, posts) on major social media (Facebook, Twitter, Google+, Pinterest, LinkedIn and Digg). A perfect plugin to make any content on your website social-share-friendly, and increase your social reach dramatically!', 'accesspress-social-share' ); ?> </p>
|
9 |
<div class="halfseperator"></div>
|
10 |
<p><strong><?php _e( 'Please visit our product page for more details here:', 'accesspress-social-share' ); ?></strong><br />
|
@@ -40,7 +38,6 @@
|
|
40 |
</div>
|
41 |
</div>
|
42 |
</div>
|
43 |
-
|
44 |
<div class="seperator"></div><div class="dottedline"></div><div class="seperator"></div>
|
45 |
<div class="other-products">
|
46 |
<h3 class="get-header"><?php _e( 'Get in touch', 'accesspress-social-share' ); ?></h3>
|
@@ -57,8 +54,6 @@
|
|
57 |
<h3 class="get-header"><?php _e( 'Get social', 'accesspress-social-share' ); ?></h3>
|
58 |
<div class="other-products-inner">
|
59 |
<p><?php _e( 'Get connected with us on social media. Facebook is the best place to find updates on our themes/plugins:', 'accesspress-social-share' ); ?> </p>
|
60 |
-
|
61 |
-
|
62 |
<p><strong><?php _e( 'Like us on facebook:', 'accesspress-social-share' ); ?></strong><br />
|
63 |
<iframe style="border: none; overflow: hidden; width: 764px; height: 206px;" src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width=842&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=1411139805828592" width="240" height="150" frameborder="0" scrolling="no"></iframe></p>
|
64 |
<ul class="social-icon clearfix">
|
2 |
<h2><?php _e( 'About Us', 'accesspress-social-share' ); ?></h2>
|
3 |
<div class="ap-tab-wrapper">
|
4 |
<p><strong><?php _e( 'AccessPress Social Share', 'accesspress-social-share' ); ?></strong> - <?php _e( 'is a FREE WordPress Plugin by AccessPress Themes.', 'accesspress-social-share' ); ?></p>
|
|
|
5 |
<p><?php _e( 'AccessPress Themes is a venture of Access Keys - who has developed hundreds of Custom WordPress themes and plugins for its clients over the years.', 'accesspress-social-share' ); ?> </p>
|
|
|
6 |
<p><strong>AccessPress Social Share</strong> - <?php _e( 'is plugin to allow anyone easily share website content (pages, posts) on major social media (Facebook, Twitter, Google+, Pinterest, LinkedIn and Digg). A perfect plugin to make any content on your website social-share-friendly, and increase your social reach dramatically!', 'accesspress-social-share' ); ?> </p>
|
7 |
<div class="halfseperator"></div>
|
8 |
<p><strong><?php _e( 'Please visit our product page for more details here:', 'accesspress-social-share' ); ?></strong><br />
|
38 |
</div>
|
39 |
</div>
|
40 |
</div>
|
|
|
41 |
<div class="seperator"></div><div class="dottedline"></div><div class="seperator"></div>
|
42 |
<div class="other-products">
|
43 |
<h3 class="get-header"><?php _e( 'Get in touch', 'accesspress-social-share' ); ?></h3>
|
54 |
<h3 class="get-header"><?php _e( 'Get social', 'accesspress-social-share' ); ?></h3>
|
55 |
<div class="other-products-inner">
|
56 |
<p><?php _e( 'Get connected with us on social media. Facebook is the best place to find updates on our themes/plugins:', 'accesspress-social-share' ); ?> </p>
|
|
|
|
|
57 |
<p><strong><?php _e( 'Like us on facebook:', 'accesspress-social-share' ); ?></strong><br />
|
58 |
<iframe style="border: none; overflow: hidden; width: 764px; height: 206px;" src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FAccessPress-Themes%2F1396595907277967&width=842&height=258&colorscheme=light&show_faces=true&header=false&stream=false&show_border=true&appId=1411139805828592" width="240" height="150" frameborder="0" scrolling="no"></iframe></p>
|
59 |
<ul class="social-icon clearfix">
|
inc/backend/activation.php
CHANGED
@@ -34,7 +34,6 @@ $apss_share_settings['enable_cache'] = '1';
|
|
34 |
$apss_share_settings['cache_period'] = '24';
|
35 |
$apss_share_settings['apss_social_counts_transients'] = array();
|
36 |
$apss_share_settings['dialog_box_options'] = '1';
|
37 |
-
// $apss_share_settings['footer_javascript'] = '1';
|
38 |
$apss_share_settings['apss_email_subject'] = 'Please visit this link %%url%%';
|
39 |
$apss_share_settings['apss_email_body'] = 'Hey Buddy!, I found this information for you: "%%title%%". Here is the website link: %%permalink%%. Thank you.';
|
40 |
update_option( APSS_SETTING_NAME, $apss_share_settings );
|
34 |
$apss_share_settings['cache_period'] = '24';
|
35 |
$apss_share_settings['apss_social_counts_transients'] = array();
|
36 |
$apss_share_settings['dialog_box_options'] = '1';
|
|
|
37 |
$apss_share_settings['apss_email_subject'] = 'Please visit this link %%url%%';
|
38 |
$apss_share_settings['apss_email_body'] = 'Hey Buddy!, I found this information for you: "%%title%%". Here is the website link: %%permalink%%. Thank you.';
|
39 |
update_option( APSS_SETTING_NAME, $apss_share_settings );
|
inc/backend/main-page.php
CHANGED
@@ -94,10 +94,6 @@
|
|
94 |
);
|
95 |
?>
|
96 |
<?php
|
97 |
-
// echo"<pre>";
|
98 |
-
// print_r($options);
|
99 |
-
// echo "</pre>";
|
100 |
-
|
101 |
foreach ( $options[ 'social_networks' ] as $key => $val ) {
|
102 |
?>
|
103 |
<div class="apss-option-wrapper">
|
@@ -368,8 +364,6 @@
|
|
368 |
}
|
369 |
?> /><label for="dialog_box_options_3"><?php _e( 'Open in popup window', 'accesspress-social-share' ); ?></label></div>
|
370 |
</div>
|
371 |
-
|
372 |
-
|
373 |
<div class='apss_cache_enable_opt'>
|
374 |
<h4><?php _e( 'Enable cache? ', 'accesspress-social-share' ); ?> </h4>
|
375 |
<div class='misc-opt'>
|
@@ -404,7 +398,6 @@
|
|
404 |
|
405 |
</div>
|
406 |
</div>
|
407 |
-
|
408 |
<div class="apss-email-settings">
|
409 |
<h4><?php _e( 'Email Settings:', 'accesspress-social-share' ); ?></h4>
|
410 |
<div class="app-email-sub email-setg">
|
@@ -425,7 +418,6 @@
|
|
425 |
</div>
|
426 |
</div>
|
427 |
<div class="apss-tab-contents apss-how-to-use" id="tab-apss-how-to-use" style='display:none' ><?php include_once('how-to-use.php'); ?></div>
|
428 |
-
|
429 |
<div class="apss-tab-contents apss-about" id="tab-apss-about" style='display:none' ><?php include('about-apss.php'); ?></div>
|
430 |
<div class="apss-tab-contents apss-resources" id="tab-apss-resources" style='display:none' ><?php include('stuff-apss.php'); ?></div>
|
431 |
<?php wp_nonce_field( 'apss_nonce_save_settings', 'apss_add_nonce_save_settings' ); ?>
|
@@ -441,7 +433,6 @@
|
|
441 |
<a href="<?php echo admin_url() . 'admin-post.php?action=apss_restore_default_settings&_wpnonce=' . $nonce; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to restore default settings?', 'accesspress-social-share' ); ?>')"><input type="button" value="Restore Default Settings" class="apss-reset-button button primary-button"/></a>
|
442 |
<a href="<?php echo admin_url() . 'admin-post.php?action=apss_clear_cache&_wpnonce=' . $nonce_clear; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to clear cache share counter?', 'accesspress-social-share' ); ?>')"><input type="button" value="Clear Cache" class="apss-reset-button button primary-button"/></a>
|
443 |
</div>
|
444 |
-
|
445 |
<div class="apss-promoFloat">
|
446 |
<a href='https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/' target='_blank'><img src="<?php echo APSS_IMAGE_DIR . '/promo-top.png' ?>" alt="promo-top" /></a>
|
447 |
<div class="apss-promo-buttons"><a target='_blank' href="http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro/" /><img src="<?php echo APSS_IMAGE_DIR . '/demo-btn.png' ?>" alt="demo link" /></a><a target='_blank' href="http://codecanyon.net/item/accesspress-social-pro/10429645?ref=AccessKeys" ><img src="<?php echo APSS_IMAGE_DIR . '/upgrade-btn.png' ?>" alt="upgrade link" /></a></div>
|
@@ -452,4 +443,4 @@
|
|
452 |
<div class="clear"></div>
|
453 |
</form>
|
454 |
</div>
|
455 |
-
</div>
|
94 |
);
|
95 |
?>
|
96 |
<?php
|
|
|
|
|
|
|
|
|
97 |
foreach ( $options[ 'social_networks' ] as $key => $val ) {
|
98 |
?>
|
99 |
<div class="apss-option-wrapper">
|
364 |
}
|
365 |
?> /><label for="dialog_box_options_3"><?php _e( 'Open in popup window', 'accesspress-social-share' ); ?></label></div>
|
366 |
</div>
|
|
|
|
|
367 |
<div class='apss_cache_enable_opt'>
|
368 |
<h4><?php _e( 'Enable cache? ', 'accesspress-social-share' ); ?> </h4>
|
369 |
<div class='misc-opt'>
|
398 |
|
399 |
</div>
|
400 |
</div>
|
|
|
401 |
<div class="apss-email-settings">
|
402 |
<h4><?php _e( 'Email Settings:', 'accesspress-social-share' ); ?></h4>
|
403 |
<div class="app-email-sub email-setg">
|
418 |
</div>
|
419 |
</div>
|
420 |
<div class="apss-tab-contents apss-how-to-use" id="tab-apss-how-to-use" style='display:none' ><?php include_once('how-to-use.php'); ?></div>
|
|
|
421 |
<div class="apss-tab-contents apss-about" id="tab-apss-about" style='display:none' ><?php include('about-apss.php'); ?></div>
|
422 |
<div class="apss-tab-contents apss-resources" id="tab-apss-resources" style='display:none' ><?php include('stuff-apss.php'); ?></div>
|
423 |
<?php wp_nonce_field( 'apss_nonce_save_settings', 'apss_add_nonce_save_settings' ); ?>
|
433 |
<a href="<?php echo admin_url() . 'admin-post.php?action=apss_restore_default_settings&_wpnonce=' . $nonce; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to restore default settings?', 'accesspress-social-share' ); ?>')"><input type="button" value="Restore Default Settings" class="apss-reset-button button primary-button"/></a>
|
434 |
<a href="<?php echo admin_url() . 'admin-post.php?action=apss_clear_cache&_wpnonce=' . $nonce_clear; ?>" onclick="return confirm('<?php _e( 'Are you sure you want to clear cache share counter?', 'accesspress-social-share' ); ?>')"><input type="button" value="Clear Cache" class="apss-reset-button button primary-button"/></a>
|
435 |
</div>
|
|
|
436 |
<div class="apss-promoFloat">
|
437 |
<a href='https://accesspressthemes.com/wordpress-plugins/accesspress-social-pro/' target='_blank'><img src="<?php echo APSS_IMAGE_DIR . '/promo-top.png' ?>" alt="promo-top" /></a>
|
438 |
<div class="apss-promo-buttons"><a target='_blank' href="http://demo.accesspressthemes.com/wordpress-plugins/accesspress-social-pro/" /><img src="<?php echo APSS_IMAGE_DIR . '/demo-btn.png' ?>" alt="demo link" /></a><a target='_blank' href="http://codecanyon.net/item/accesspress-social-pro/10429645?ref=AccessKeys" ><img src="<?php echo APSS_IMAGE_DIR . '/upgrade-btn.png' ?>" alt="upgrade link" /></a></div>
|
443 |
<div class="clear"></div>
|
444 |
</form>
|
445 |
</div>
|
446 |
+
</div>
|
inc/backend/save-settings.php
CHANGED
@@ -52,5 +52,4 @@ if ( $status == TRUE ) {
|
|
52 |
} else {
|
53 |
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=2' );
|
54 |
}
|
55 |
-
exit;
|
56 |
-
|
52 |
} else {
|
53 |
wp_redirect( admin_url() . 'admin.php?page=accesspress-social-share&message=2' );
|
54 |
}
|
55 |
+
exit;
|
|
inc/frontend/content-filter.php
CHANGED
@@ -10,7 +10,7 @@ if(isset($options['twitter_counter_api'])){
|
|
10 |
$twitter_api_use = '1';
|
11 |
}
|
12 |
$icon_set_value = $options['social_icon_set'];
|
13 |
-
$url = get_permalink();
|
14 |
$cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
|
15 |
|
16 |
if ( isset( $options['total_counter_enable_options'] ) ) {
|
@@ -32,22 +32,20 @@ if(isset($options['enable_http_count'])){
|
|
32 |
}
|
33 |
?>
|
34 |
|
35 |
-
|
36 |
<?php if ( isset( $options['share_text'] ) && $options['share_text'] != '' ) { ?> <div class='apss-share-text'><?php echo $options['share_text']; ?></div> <?php } ?>
|
37 |
-
|
38 |
<?php
|
39 |
$total_count = 0;
|
40 |
|
41 |
foreach ( $options['social_networks'] as $key => $value ) {
|
42 |
if ( intval( $value ) == '1' ) {
|
43 |
$count = $this->get_count( $key, $url );
|
44 |
-
|
45 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
46 |
$url_check = parse_url($url);
|
47 |
if($url_check['scheme'] == 'https'){
|
48 |
-
$flag=TRUE;
|
49 |
}else{
|
50 |
-
$flag=FALSE;
|
51 |
}
|
52 |
|
53 |
if($flag == TRUE){
|
@@ -60,20 +58,20 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
-
|
64 |
$total_count += $count;
|
65 |
switch ( $key ) {
|
66 |
-
|
67 |
case 'facebook':
|
68 |
$link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
|
69 |
$count = $this->get_count( $key, $url );
|
70 |
-
|
71 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
72 |
$url_check = parse_url($url);
|
73 |
if($url_check['scheme'] == 'https'){
|
74 |
-
$flag=TRUE;
|
75 |
}else{
|
76 |
-
$flag=FALSE;
|
77 |
}
|
78 |
if($flag == TRUE){
|
79 |
$url1 = APSS_Class:: get_http_url($url);
|
@@ -85,8 +83,7 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
85 |
}
|
86 |
}
|
87 |
}
|
88 |
-
|
89 |
-
|
90 |
?>
|
91 |
<div class='apss-facebook apss-single-icon'>
|
92 |
<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; ?>'>
|
@@ -102,8 +99,7 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
102 |
</div>
|
103 |
<?php
|
104 |
break;
|
105 |
-
|
106 |
-
//counter available for twitter
|
107 |
case 'twitter':
|
108 |
$url_twitter = $url;
|
109 |
$url_twitter = urlencode( $url_twitter );
|
@@ -112,13 +108,12 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
112 |
}
|
113 |
$link = "https://twitter.com/intent/tweet?text=$title&url=$url_twitter&$twitter_user";
|
114 |
$count = $this->get_count( $key, $url );
|
115 |
-
////////////////////////////////////////
|
116 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
117 |
$url_check = parse_url($url);
|
118 |
if($url_check['scheme'] == 'https'){
|
119 |
-
$flag=TRUE;
|
120 |
}else{
|
121 |
-
$flag=FALSE;
|
122 |
}
|
123 |
|
124 |
if($flag == TRUE){
|
@@ -131,7 +126,6 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
131 |
}
|
132 |
}
|
133 |
}
|
134 |
-
///////////////////////////////////////////
|
135 |
?>
|
136 |
<div class='apss-twitter apss-single-icon'>
|
137 |
<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; ?>'>
|
@@ -146,12 +140,11 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
146 |
</div>
|
147 |
<?php
|
148 |
break;
|
149 |
-
|
150 |
-
//counter available for google plus
|
151 |
case 'google-plus':
|
152 |
$link = 'https://plus.google.com/share?url=' . $url;
|
153 |
$count = $this->get_count( $key, $url );
|
154 |
-
|
155 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
156 |
$url_check = parse_url($url);
|
157 |
if($url_check['scheme'] == 'https'){
|
@@ -170,7 +163,7 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
170 |
}
|
171 |
}
|
172 |
}
|
173 |
-
|
174 |
?>
|
175 |
<div class='apss-google-plus apss-single-icon'>
|
176 |
<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; ?>'>
|
@@ -179,24 +172,20 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
179 |
<span class='apss-social-text'><?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?></span>
|
180 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
181 |
</div>
|
182 |
-
<?php /* if ( isset( $counter_enable_options ) && $counter_enable_options == '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 pinterest
|
191 |
case 'pinterest':
|
192 |
$count = $this->get_count( $key, $url );
|
193 |
-
|
194 |
-
if(isset($http_url_checked) && $http_url_checked=='1'){
|
195 |
$url_check = parse_url($url);
|
196 |
if($url_check['scheme'] == 'https'){
|
197 |
-
$flag=TRUE;
|
198 |
}else{
|
199 |
-
$flag=FALSE;
|
200 |
}
|
201 |
|
202 |
if($flag == TRUE){
|
@@ -209,7 +198,7 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
209 |
}
|
210 |
}
|
211 |
}
|
212 |
-
|
213 |
?>
|
214 |
|
215 |
<div class='apss-pinterest apss-single-icon'>
|
@@ -228,11 +217,10 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
228 |
<?php
|
229 |
break;
|
230 |
|
231 |
-
//couter available for linkedin
|
232 |
case 'linkedin':
|
233 |
$link = "http://www.linkedin.com/shareArticle?mini=true&title=" . $title . "&url=" . $url . "&summary=" . $excerpt;
|
234 |
$count = $this->get_count( $key, $url );
|
235 |
-
|
236 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
237 |
$url_check = parse_url($url);
|
238 |
if($url_check['scheme'] == 'https'){
|
@@ -251,18 +239,13 @@ foreach ( $options['social_networks'] as $key => $value ) {
|
|
251 |
}
|
252 |
}
|
253 |
}
|
254 |
-
///////////////////////////////////////////
|
255 |
?>
|
256 |
-
|
257 |
<div class='apss-linkedin apss-single-icon'>
|
258 |
<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; ?>'>
|
259 |
<div class='apss-icon-block clearfix'><i class='fa fa-linkedin'></i>
|
260 |
<span class='apss-social-text'><?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?></span>
|
261 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
262 |
</div>
|
263 |
-
<?php /* if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
|
264 |
-
<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>
|
265 |
-
<?php } */ ?>
|
266 |
</a>
|
267 |
</div>
|
268 |
<?php
|
10 |
$twitter_api_use = '1';
|
11 |
}
|
12 |
$icon_set_value = $options['social_icon_set'];
|
13 |
+
$url = get_permalink();
|
14 |
$cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
|
15 |
|
16 |
if ( isset( $options['total_counter_enable_options'] ) ) {
|
32 |
}
|
33 |
?>
|
34 |
|
|
|
35 |
<?php if ( isset( $options['share_text'] ) && $options['share_text'] != '' ) { ?> <div class='apss-share-text'><?php echo $options['share_text']; ?></div> <?php } ?>
|
|
|
36 |
<?php
|
37 |
$total_count = 0;
|
38 |
|
39 |
foreach ( $options['social_networks'] as $key => $value ) {
|
40 |
if ( intval( $value ) == '1' ) {
|
41 |
$count = $this->get_count( $key, $url );
|
42 |
+
|
43 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
44 |
$url_check = parse_url($url);
|
45 |
if($url_check['scheme'] == 'https'){
|
46 |
+
$flag = TRUE;
|
47 |
}else{
|
48 |
+
$flag = FALSE;
|
49 |
}
|
50 |
|
51 |
if($flag == TRUE){
|
58 |
}
|
59 |
}
|
60 |
}
|
61 |
+
|
62 |
$total_count += $count;
|
63 |
switch ( $key ) {
|
64 |
+
|
65 |
case 'facebook':
|
66 |
$link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
|
67 |
$count = $this->get_count( $key, $url );
|
68 |
+
|
69 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
70 |
$url_check = parse_url($url);
|
71 |
if($url_check['scheme'] == 'https'){
|
72 |
+
$flag = TRUE;
|
73 |
}else{
|
74 |
+
$flag = FALSE;
|
75 |
}
|
76 |
if($flag == TRUE){
|
77 |
$url1 = APSS_Class:: get_http_url($url);
|
83 |
}
|
84 |
}
|
85 |
}
|
86 |
+
|
|
|
87 |
?>
|
88 |
<div class='apss-facebook apss-single-icon'>
|
89 |
<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; ?>'>
|
99 |
</div>
|
100 |
<?php
|
101 |
break;
|
102 |
+
|
|
|
103 |
case 'twitter':
|
104 |
$url_twitter = $url;
|
105 |
$url_twitter = urlencode( $url_twitter );
|
108 |
}
|
109 |
$link = "https://twitter.com/intent/tweet?text=$title&url=$url_twitter&$twitter_user";
|
110 |
$count = $this->get_count( $key, $url );
|
|
|
111 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
112 |
$url_check = parse_url($url);
|
113 |
if($url_check['scheme'] == 'https'){
|
114 |
+
$flag = TRUE;
|
115 |
}else{
|
116 |
+
$flag = FALSE;
|
117 |
}
|
118 |
|
119 |
if($flag == TRUE){
|
126 |
}
|
127 |
}
|
128 |
}
|
|
|
129 |
?>
|
130 |
<div class='apss-twitter apss-single-icon'>
|
131 |
<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; ?>'>
|
140 |
</div>
|
141 |
<?php
|
142 |
break;
|
143 |
+
|
|
|
144 |
case 'google-plus':
|
145 |
$link = 'https://plus.google.com/share?url=' . $url;
|
146 |
$count = $this->get_count( $key, $url );
|
147 |
+
|
148 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
149 |
$url_check = parse_url($url);
|
150 |
if($url_check['scheme'] == 'https'){
|
163 |
}
|
164 |
}
|
165 |
}
|
166 |
+
|
167 |
?>
|
168 |
<div class='apss-google-plus apss-single-icon'>
|
169 |
<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; ?>'>
|
172 |
<span class='apss-social-text'><?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?></span>
|
173 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
174 |
</div>
|
|
|
|
|
|
|
175 |
</a>
|
176 |
</div>
|
177 |
<?php
|
178 |
break;
|
179 |
|
|
|
180 |
case 'pinterest':
|
181 |
$count = $this->get_count( $key, $url );
|
182 |
+
|
183 |
+
if(isset($http_url_checked) && $http_url_checked == '1'){
|
184 |
$url_check = parse_url($url);
|
185 |
if($url_check['scheme'] == 'https'){
|
186 |
+
$flag = TRUE;
|
187 |
}else{
|
188 |
+
$flag = FALSE;
|
189 |
}
|
190 |
|
191 |
if($flag == TRUE){
|
198 |
}
|
199 |
}
|
200 |
}
|
201 |
+
|
202 |
?>
|
203 |
|
204 |
<div class='apss-pinterest apss-single-icon'>
|
217 |
<?php
|
218 |
break;
|
219 |
|
|
|
220 |
case 'linkedin':
|
221 |
$link = "http://www.linkedin.com/shareArticle?mini=true&title=" . $title . "&url=" . $url . "&summary=" . $excerpt;
|
222 |
$count = $this->get_count( $key, $url );
|
223 |
+
|
224 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
225 |
$url_check = parse_url($url);
|
226 |
if($url_check['scheme'] == 'https'){
|
239 |
}
|
240 |
}
|
241 |
}
|
|
|
242 |
?>
|
|
|
243 |
<div class='apss-linkedin apss-single-icon'>
|
244 |
<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; ?>'>
|
245 |
<div class='apss-icon-block clearfix'><i class='fa fa-linkedin'></i>
|
246 |
<span class='apss-social-text'><?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?></span>
|
247 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
248 |
</div>
|
|
|
|
|
|
|
249 |
</a>
|
250 |
</div>
|
251 |
<?php
|
inc/frontend/shortcode.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
<?php defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
2 |
-
<?php
|
3 |
global $post;
|
4 |
$options = get_option( APSS_SETTING_NAME );
|
5 |
$apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
|
@@ -17,6 +16,7 @@ if(isset($attr['custom_share_link']) && $attr['custom_share_link'] !=''){
|
|
17 |
}else{
|
18 |
$url = get_permalink();
|
19 |
}
|
|
|
20 |
$cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
|
21 |
if ( isset( $attr['networks'] ) ) {
|
22 |
$raw_array = explode( ',', $attr['networks'] );
|
@@ -75,8 +75,7 @@ if($show_shortcode_content){
|
|
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'){
|
@@ -95,7 +94,7 @@ if($show_shortcode_content){
|
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
-
|
99 |
|
100 |
$total_count += $count;
|
101 |
switch ( $key ) {
|
@@ -103,8 +102,6 @@ if($show_shortcode_content){
|
|
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'){
|
@@ -123,7 +120,7 @@ if($show_shortcode_content){
|
|
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; ?>'>
|
@@ -171,7 +168,7 @@ if($show_shortcode_content){
|
|
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; ?>'>
|
@@ -211,7 +208,7 @@ if($show_shortcode_content){
|
|
211 |
}
|
212 |
}
|
213 |
}
|
214 |
-
|
215 |
|
216 |
?>
|
217 |
<div class='apss-google-plus apss-single-icon'>
|
@@ -221,11 +218,6 @@ if($show_shortcode_content){
|
|
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
|
@@ -253,7 +245,7 @@ if($show_shortcode_content){
|
|
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();'>
|
@@ -275,27 +267,7 @@ if($show_shortcode_content){
|
|
275 |
//couter available for linkedin
|
276 |
case 'linkedin':
|
277 |
$link = "http://www.linkedin.com/shareArticle?mini=true&title=" . $title . "&url=" . $url . "&summary=" . $excerpt;
|
278 |
-
|
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; ?>'>
|
@@ -303,13 +275,6 @@ if($show_shortcode_content){
|
|
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
|
1 |
+
<?php defined( 'ABSPATH' ) or die( "No script kiddies please!" );
|
|
|
2 |
global $post;
|
3 |
$options = get_option( APSS_SETTING_NAME );
|
4 |
$apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
|
16 |
}else{
|
17 |
$url = get_permalink();
|
18 |
}
|
19 |
+
|
20 |
$cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
|
21 |
if ( isset( $attr['networks'] ) ) {
|
22 |
$raw_array = explode( ',', $attr['networks'] );
|
75 |
foreach ( $options['social_networks'] as $key => $value ) {
|
76 |
if ( intval( $value ) == '1' ) {
|
77 |
$count = $this->get_count( $key, $url );
|
78 |
+
|
|
|
79 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
80 |
$url_check = parse_url($url);
|
81 |
if($url_check['scheme'] == 'https'){
|
94 |
}
|
95 |
}
|
96 |
}
|
97 |
+
|
98 |
|
99 |
$total_count += $count;
|
100 |
switch ( $key ) {
|
102 |
case 'facebook':
|
103 |
$link = 'https://www.facebook.com/sharer/sharer.php?u=' . $url;
|
104 |
$count = $this->get_count( $key, $url );
|
|
|
|
|
105 |
if(isset($http_url_checked) && $http_url_checked=='1'){
|
106 |
$url_check = parse_url($url);
|
107 |
if($url_check['scheme'] == 'https'){
|
120 |
}
|
121 |
}
|
122 |
}
|
123 |
+
|
124 |
?>
|
125 |
<div class='apss-facebook apss-single-icon'>
|
126 |
<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; ?>'>
|
168 |
}
|
169 |
}
|
170 |
}
|
171 |
+
|
172 |
?>
|
173 |
<div class='apss-twitter apss-single-icon'>
|
174 |
<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; ?>'>
|
208 |
}
|
209 |
}
|
210 |
}
|
211 |
+
|
212 |
|
213 |
?>
|
214 |
<div class='apss-google-plus apss-single-icon'>
|
218 |
<span class='apss-social-text'><?php _e( 'Share on Google Plus', 'accesspress-social-share' ); ?> </span>
|
219 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
220 |
</div>
|
|
|
|
|
|
|
|
|
|
|
221 |
</a>
|
222 |
</div>
|
223 |
<?php
|
245 |
}
|
246 |
}
|
247 |
}
|
248 |
+
|
249 |
?>
|
250 |
<div class='apss-pinterest apss-single-icon'>
|
251 |
<a rel='nofollow' title='<?php _e( 'Share on Pinterest', 'accesspress-social-share' ); ?>' href='javascript:pinIt();'>
|
267 |
//couter available for linkedin
|
268 |
case 'linkedin':
|
269 |
$link = "http://www.linkedin.com/shareArticle?mini=true&title=" . $title . "&url=" . $url . "&summary=" . $excerpt;
|
270 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
?>
|
272 |
<div class='apss-linkedin apss-single-icon'>
|
273 |
<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; ?>'>
|
275 |
<span class='apss-social-text'><?php _e( 'Share on LinkedIn', 'accesspress-social-share' ); ?></span>
|
276 |
<span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
|
277 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
</a>
|
279 |
</div>
|
280 |
<?php
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Access Keys
|
|
3 |
Tags: social share counter, social share, social media share, social network share, social media, social network, share counter, social share count, social url share, social icons
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 4.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -157,6 +157,12 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
|
161 |
= 4.4.2 =
|
162 |
*Updated the Facebook Api.
|
@@ -442,7 +448,6 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
|
|
442 |
* Done the bug fixing for label attributes for display settings tab and miscellaneous tab.
|
443 |
* Some changes done for how to use section and about sections.
|
444 |
|
445 |
-
|
446 |
= 1.0.1 =
|
447 |
* Added the options for the display of the social share in home page.
|
448 |
* Fixed wp error occuring for the http request made by site.
|
3 |
Tags: social share counter, social share, social media share, social network share, social media, social network, share counter, social share count, social url share, social icons
|
4 |
Donate link: http://accesspressthemes.com/donation/
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 5.2.1
|
7 |
+
Stable tag: 4.4.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
157 |
|
158 |
== Changelog ==
|
159 |
|
160 |
+
= 4.4.4 =
|
161 |
+
* Refinement in the code
|
162 |
+
* Checked plugin compactibility with wordpress version 5.2x
|
163 |
+
|
164 |
+
= 4.4.3 =
|
165 |
+
*General Bug Fixes in the plugin.
|
166 |
|
167 |
= 4.4.2 =
|
168 |
*Updated the Facebook Api.
|
448 |
* Done the bug fixing for label attributes for display settings tab and miscellaneous tab.
|
449 |
* Some changes done for how to use section and about sections.
|
450 |
|
|
|
451 |
= 1.0.1 =
|
452 |
* Added the options for the display of the social share in home page.
|
453 |
* Fixed wp error occuring for the http request made by site.
|