Social Share WordPress Plugin – AccessPress Social Share - Version 4.5.5

Version Description

  • Added feature of default facebook share button with share counter.
  • Fixed error related to deprecation of non static method called statically.
  • Fixed minor bugs in the main page.
  • Checked compatibility with WP version 5.7.
Download this release

Release Info

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

Code changes from version 4.5.4 to 4.5.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.5.4
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain: accesspress-social-share
@@ -35,7 +35,7 @@ if ( ! defined( 'APSS_LANG_DIR' ) ) {
35
  }
36
 
37
  if ( ! defined( 'APSS_VERSION' ) ) {
38
- define( 'APSS_VERSION', '4.5.4' );
39
  }
40
 
41
  if ( ! defined( 'APSS_TEXT_DOMAIN' ) ) {
@@ -610,9 +610,9 @@ if ( ! class_exists( 'APSS_Class' ) ) {
610
  }
611
  }
612
 
613
- static function facebook_new_share_count_api( $url ){
614
 
615
- $access_token = self::get_fb_access_token( $url );
616
  $api_url = 'https://graph.facebook.com/';
617
 
618
  // Not Working --v
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.5.5
8
  Author: AccessPress Themes
9
  Author URI: http://accesspressthemes.com
10
  Text Domain: accesspress-social-share
35
  }
36
 
37
  if ( ! defined( 'APSS_VERSION' ) ) {
38
+ define( 'APSS_VERSION', '4.5.5' );
39
  }
40
 
41
  if ( ! defined( 'APSS_TEXT_DOMAIN' ) ) {
610
  }
611
  }
612
 
613
+ function facebook_new_share_count_api( $url ){
614
 
615
+ $access_token = $this->get_fb_access_token( $url );
616
  $api_url = 'https://graph.facebook.com/';
617
 
618
  // Not Working --v
css/frontend.css CHANGED
@@ -1216,4 +1216,15 @@
1216
  }
1217
  .apss-social-share.apss_font_awesome_five .fas{
1218
  font-family:'Font Awesome 5 Free';
 
 
 
 
 
 
 
 
 
 
 
1219
  }
1216
  }
1217
  .apss-social-share.apss_font_awesome_five .fas{
1218
  font-family:'Font Awesome 5 Free';
1219
+ }
1220
+ .apss-default-facebook{
1221
+ /*border-radius: 76px;*/
1222
+ color: #fff;
1223
+ display: block;
1224
+ float: left;
1225
+ height: auto;
1226
+ margin: 5px;
1227
+ padding: 9px;
1228
+ position: relative;
1229
+ width: auto;
1230
  }
inc/backend/activation.php CHANGED
@@ -36,4 +36,5 @@ $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 );
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
+ $apss_share_settings['fb_default_share_enable_options'] = '1';
40
  update_option( APSS_SETTING_NAME, $apss_share_settings );
inc/backend/main-page.php CHANGED
@@ -309,10 +309,25 @@
309
  </div>
310
  <div class="apss_notes_cache_settings"> Note: If you switch the API please don't forget to clear cache for fetching new share counts.</div>
311
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  <div class="apss_counter-api">
313
  <h4>If facebook counter is not working. Please setup the facebook APP and enter required details below.</h4>
314
  <div class='apss_input_wrapper'>
315
- <label for=apss_facebook_app_id"">APP ID: </label><input type='text' id="apss_facebook_app_id" name='apss_share_settings[api_configuration][facebook][app_id]' value="<?php
316
  if ( isset( $options[ 'api_configuration' ][ 'facebook' ][ 'app_id' ] ) ) {
317
  echo esc_attr($options[ 'api_configuration' ][ 'facebook' ][ 'app_id' ]);
318
  }
@@ -320,7 +335,7 @@
320
  <div class="apss_notes_cache_settings">Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App ID.</div>
321
  </div>
322
  <div class='apss_input_wrapper'>
323
- <label for=apss_facebook_app_secret"">APP Secret: </label><input type='text' id="apss_facebook_app_secret" name='apss_share_settings[api_configuration][facebook][app_secret]' value="<?php
324
  if ( isset( $options[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ] ) ) {
325
  echo esc_attr($options[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ]);
326
  }
309
  </div>
310
  <div class="apss_notes_cache_settings"> Note: If you switch the API please don't forget to clear cache for fetching new share counts.</div>
311
 
312
+ <div class="apss-counter-settings clearfix">
313
+ <h4><?php _e( 'Enable default facebook share button with counter?', 'accesspress-social-share' ); ?> </h4>
314
+ <div class="misc-opt"><input type="radio" id='fb_default_share_enable_options_n' name="apss_share_settings[fb_default_share_enable_options]" value="0" <?php
315
+ if ( $options[ 'fb_default_share_enable_options' ] == '0' ) {
316
+ echo "checked='checked'";
317
+ }
318
+ ?> /><label for="fb_default_share_enable_options_n"><?php _e( 'No', 'accesspress-social-share' ); ?></label></div>
319
+ <div class="misc-opt"><input type="radio" id='fb_default_share_enable_options_y' name="apss_share_settings[fb_default_share_enable_options]" value="1" <?php
320
+ if ( $options[ 'fb_default_share_enable_options' ] == '1' ) {
321
+ echo "checked='checked'";
322
+ }
323
+ ?> /><label for="fb_default_share_enable_options_y"><?php _e( 'Yes', 'accesspress-social-share' ); ?></label></div>
324
+
325
+ </div>
326
+
327
  <div class="apss_counter-api">
328
  <h4>If facebook counter is not working. Please setup the facebook APP and enter required details below.</h4>
329
  <div class='apss_input_wrapper'>
330
+ <label for="apss_facebook_app_id">APP ID: </label><input type='text' id="apss_facebook_app_id" name='apss_share_settings[api_configuration][facebook][app_id]' value="<?php
331
  if ( isset( $options[ 'api_configuration' ][ 'facebook' ][ 'app_id' ] ) ) {
332
  echo esc_attr($options[ 'api_configuration' ][ 'facebook' ][ 'app_id' ]);
333
  }
335
  <div class="apss_notes_cache_settings">Please go to <a href="https://developers.facebook.com/" target="_blank">https://developers.facebook.com/</a> and create an app and get the App ID.</div>
336
  </div>
337
  <div class='apss_input_wrapper'>
338
+ <label for="apss_facebook_app_secret">APP Secret: </label><input type='text' id="apss_facebook_app_secret" name='apss_share_settings[api_configuration][facebook][app_secret]' value="<?php
339
  if ( isset( $options[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ] ) ) {
340
  echo esc_attr($options[ 'api_configuration' ][ 'facebook' ][ 'app_secret' ]);
341
  }
inc/backend/save-settings.php CHANGED
@@ -45,6 +45,7 @@ $apss_share_settings[ 'apss_email_body' ] = stripslashes_deep( sanitize_text_fie
45
  if ( ! isset( $apss_share_settings[ 'apss_social_counts_transients' ] ) ) {
46
  $apss_share_settings[ 'apss_social_counts_transients' ] = array();
47
  }
 
48
 
49
  // The option already exists, so we just update it.
50
  $status = update_option( APSS_SETTING_NAME, $apss_share_settings );
45
  if ( ! isset( $apss_share_settings[ 'apss_social_counts_transients' ] ) ) {
46
  $apss_share_settings[ 'apss_social_counts_transients' ] = array();
47
  }
48
+ $apss_share_settings[ 'fb_default_share_enable_options' ] = sanitize_text_field($_POST[ 'apss_share_settings' ][ 'fb_default_share_enable_options' ]);
49
 
50
  // The option already exists, so we just update it.
51
  $status = update_option( APSS_SETTING_NAME, $apss_share_settings );
inc/frontend/content-filter.php CHANGED
@@ -84,20 +84,24 @@ foreach ( $options['social_networks'] as $key => $value ) {
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 esc_url($link); ?>'>
90
- <div class='apss-icon-block clearfix'>
91
- <i class='<?php echo esc_attr($facebook);?>'></i>
92
- <span class='apss-social-text'><?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?></span>
93
- <span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
94
- </div>
95
- <?php if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
96
- <div class='count apss-count' data-url='<?php echo esc_url($url); ?>' data-social-network='<?php echo esc_attr($key); ?>' data-social-detail="<?php echo esc_url($url) . '_' . $key; ?>"><?php echo esc_attr($count); ?></div>
97
- <?php } ?>
98
- </a>
99
- </div>
100
- <?php
 
 
 
 
101
  break;
102
 
103
  case 'twitter':
84
  }
85
  }
86
 
87
+ if(isset($options['fb_default_share_enable_options']) && $options['fb_default_share_enable_options'] == '1'){ ?>
88
+ <div class="apss-default-facebook">
89
+ <iframe src="https://www.facebook.com/plugins/share_button.php?href=<?php echo esc_url($url); ?>&layout=button_count&size=small&appId=&width=83&height=20" width="83" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
90
+ </div>
91
+ <?php } else { ?>
92
+ <div class='apss-facebook apss-single-icon'>
93
+ <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 esc_url($link); ?>'>
94
+ <div class='apss-icon-block clearfix'>
95
+ <i class='<?php echo esc_attr($facebook);?>'></i>
96
+ <span class='apss-social-text'><?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?></span>
97
+ <span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
98
+ </div>
99
+ <?php if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
100
+ <div class='count apss-count' data-url='<?php echo esc_url($url); ?>' data-social-network='<?php echo esc_attr($key); ?>' data-social-detail="<?php echo esc_url($url) . '_' . $key; ?>"><?php echo esc_attr($count); ?></div>
101
+ <?php } ?>
102
+ </a>
103
+ </div>
104
+ <?php }
105
  break;
106
 
107
  case 'twitter':
inc/frontend/shortcode.php CHANGED
@@ -135,22 +135,24 @@ if($show_shortcode_content){
135
  }
136
  }
137
 
138
- ?>
139
- <div class='apss-facebook apss-single-icon'>
140
- <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 esc_url($link); ?>'>
141
- <div class='apss-icon-block clearfix'>
142
- <i class='<?php echo esc_attr($facebook);?>'></i>
143
- <span class='apss-social-text'><?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?></span>
144
- <span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
145
- </div>
146
- <?php
147
- if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
148
- <div class='count apss-count' data-url='<?php echo esc_url($url); ?>' data-social-network='<?php echo esc_attr($key); ?>' data-social-detail="<?php echo esc_url($url) . '_' . $key; ?>"><?php echo esc_attr($count); ?></div>
149
- <?php
150
- } ?>
151
- </a>
152
- </div>
153
- <?php
 
 
154
  break;
155
 
156
  //counter available for twitter
135
  }
136
  }
137
 
138
+ if(isset($options['fb_default_share_enable_options']) && $options['fb_default_share_enable_options'] == '1'){ ?>
139
+ <div class="apss-default-facebook">
140
+ <iframe src="https://www.facebook.com/plugins/share_button.php?href=<?php echo esc_url($url); ?>&layout=button_count&size=small&appId=&width=83&height=20" width="83" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
141
+ </div>
142
+ <?php } else { ?>
143
+ <div class='apss-facebook apss-single-icon'>
144
+ <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 esc_url($link); ?>'>
145
+ <div class='apss-icon-block clearfix'>
146
+ <i class='<?php echo esc_attr($facebook);?>'></i>
147
+ <span class='apss-social-text'><?php _e( 'Share on Facebook', 'accesspress-social-share' ); ?></span>
148
+ <span class='apss-share'><?php _e( 'Share', 'accesspress-social-share' ); ?></span>
149
+ </div>
150
+ <?php if ( isset( $counter_enable_options ) && $counter_enable_options == '1' ) { ?>
151
+ <div class='count apss-count' data-url='<?php echo esc_url($url); ?>' data-social-network='<?php echo esc_attr($key); ?>' data-social-detail="<?php echo esc_url($url) . '_' . $key; ?>"><?php echo esc_attr($count); ?></div>
152
+ <?php } ?>
153
+ </a>
154
+ </div>
155
+ <?php }
156
  break;
157
 
158
  //counter available for twitter
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.5.1
7
- Stable tag: 4.5.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,13 @@ Yes. You can use the AccessPress social share by using shortcode anywhere you wa
137
  6. Backend Miscellaneous Settings Section
138
 
139
  == Changelog ==
 
 
 
 
 
 
 
140
  = 4.5.4 =
141
  * Few code refinement
142
 
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
7
+ Stable tag: 4.5.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
  6. Backend Miscellaneous Settings Section
138
 
139
  == Changelog ==
140
+
141
+ = 4.5.5 =
142
+ * Added feature of default facebook share button with share counter.
143
+ * Fixed error related to deprecation of non static method called statically.
144
+ * Fixed minor bugs in the main page.
145
+ * Checked compatibility with WP version 5.7.
146
+
147
  = 4.5.4 =
148
  * Few code refinement
149