Social Share WordPress Plugin – AccessPress Social Share - Version 4.0.5

Version Description

  • Fixed small bug for the twitter counter api selection issue.
  • Fixed undefined index issue for the twitter counter.
Download this release

Release Info

Developer Access Keys
Plugin Icon 128x128 Social Share WordPress Plugin – AccessPress Social Share
Version 4.0.5
Comparing to
See all releases

Code changes from version 4.0.4 to 4.0.5

accesspress-social-share.php CHANGED
@@ -4,7 +4,7 @@ defined( 'ABSPATH' ) or die( "No script kiddies please!" );
4
  Plugin name: 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.0.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.0.4' );
34
  }
35
 
36
  if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
@@ -418,8 +418,11 @@ if ( !class_exists( 'APSS_Class' ) ) {
418
  //for setting the counter transient in separate options value
419
  $apss_social_counts_transients = get_option( APSS_COUNT_TRANSIENTS );
420
  if ( false === $twitter_transient_count ) {
421
- $api_selection = $apss_settings['twitter_counter_api'];
422
-
 
 
 
423
  // $json_string = $this->get_json_values( 'http://urls.api.twitter.com/1/urls/count.json?url=' . $url );
424
 
425
  if($api_selection == '2'){
@@ -431,7 +434,7 @@ if ( !class_exists( 'APSS_Class' ) ) {
431
  }else{
432
  $json_string = $this->get_json_values( 'http://urls.api.twitter.com/1/urls/count.json?url=' . $url );
433
  }
434
-
435
  $json = json_decode( $json_string, true );
436
  $tweet_count = isset( $json['count'] ) ? intval( $json['count'] ) : 0;
437
  set_transient( $twitter_transient, $tweet_count, $cache_period * HOUR_IN_SECONDS );
4
  Plugin name: 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.0.5
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.0.5' );
34
  }
35
 
36
  if ( !defined( 'APSS_TEXT_DOMAIN' ) ) {
418
  //for setting the counter transient in separate options value
419
  $apss_social_counts_transients = get_option( APSS_COUNT_TRANSIENTS );
420
  if ( false === $twitter_transient_count ) {
421
+ if(isset($apss_settings['twitter_counter_api'])){
422
+ $api_selection = $apss_settings['twitter_counter_api'];
423
+ }else{
424
+ $api_selection = '1';
425
+ }
426
  // $json_string = $this->get_json_values( 'http://urls.api.twitter.com/1/urls/count.json?url=' . $url );
427
 
428
  if($api_selection == '2'){
434
  }else{
435
  $json_string = $this->get_json_values( 'http://urls.api.twitter.com/1/urls/count.json?url=' . $url );
436
  }
437
+
438
  $json = json_decode( $json_string, true );
439
  $tweet_count = isset( $json['count'] ) ? intval( $json['count'] ) : 0;
440
  set_transient( $twitter_transient, $tweet_count, $cache_period * HOUR_IN_SECONDS );
inc/frontend/content-filter.php CHANGED
@@ -3,7 +3,11 @@
3
  $apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
4
  $twitter_user = $options['twitter_username'];
5
  $counter_enable_options = $options['counter_enable_options'];
6
- $twitter_api_use = $options['twitter_counter_api'];
 
 
 
 
7
  $icon_set_value = $options['social_icon_set'];
8
  $url = get_permalink(); //$this->curPageURL();
9
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
3
  $apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
4
  $twitter_user = $options['twitter_username'];
5
  $counter_enable_options = $options['counter_enable_options'];
6
+ if(isset($options['twitter_counter_api'])){
7
+ $twitter_api_use = ($options['twitter_counter_api'] != '1') ? $options['twitter_counter_api'] : '1';
8
+ }else{
9
+ $twitter_api_use = '1';
10
+ }
11
  $icon_set_value = $options['social_icon_set'];
12
  $url = get_permalink(); //$this->curPageURL();
13
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
inc/frontend/shortcode.php CHANGED
@@ -5,7 +5,11 @@ $options = get_option( APSS_SETTING_NAME );
5
  $apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
6
  $twitter_user = $options['twitter_username'];
7
  $icon_set_value = $options['social_icon_set'];
8
- $twitter_api_use = $options['twitter_counter_api'];
 
 
 
 
9
  $url = get_permalink();
10
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
11
  if ( isset( $attr['networks'] ) ) {
@@ -34,6 +38,7 @@ if ( isset( $attr['counter'] ) ) {
34
  } else {
35
  $counter_enable_options = 0;
36
  }
 
37
  ?>
38
 
39
  <div class='apss-social-share apss-theme-<?php echo $icon_set_value; ?> clearfix'>
5
  $apss_link_open_option = ($options['dialog_box_options'] == '1') ? "_blank" : "";
6
  $twitter_user = $options['twitter_username'];
7
  $icon_set_value = $options['social_icon_set'];
8
+ if(isset($options['twitter_counter_api'])){
9
+ $twitter_api_use = ($options['twitter_counter_api'] != '1') ? $options['twitter_counter_api'] : '1';
10
+ }else{
11
+ $twitter_api_use = '1';
12
+ }
13
  $url = get_permalink();
14
  $cache_period = ($options['cache_period'] != '') ? $options['cache_period'] * 60 * 60 : 24 * 60 * 60;
15
  if ( isset( $attr['networks'] ) ) {
38
  } else {
39
  $counter_enable_options = 0;
40
  }
41
+
42
  ?>
43
 
44
  <div class='apss-social-share apss-theme-<?php echo $icon_set_value; ?> clearfix'>
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.4
7
- Stable tag: 4.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -131,6 +131,10 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
131
  6. Backend Miscellaneous Settings Section
132
 
133
  == Changelog ==
 
 
 
 
134
  = 4.0.4 =
135
  * Addition of options to enable OpenShareCount and NewShareCounts for fetching the twitter share counts.
136
 
4
  Donate link: http://accesspressthemes.com/donation/
5
  Requires at least: 3.8
6
  Tested up to: 4.4
7
+ Stable tag: 4.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
131
  6. Backend Miscellaneous Settings Section
132
 
133
  == Changelog ==
134
+ = 4.0.5 =
135
+ * Fixed small bug for the twitter counter api selection issue.
136
+ * Fixed undefined index issue for the twitter counter.
137
+
138
  = 4.0.4 =
139
  * Addition of options to enable OpenShareCount and NewShareCounts for fetching the twitter share counts.
140