Facebook Button by BestWebSoft - Version 2.68

Version Description

  • 26.08.2020 =
  • Update : All functionality was updated for WordPress 5.5.
  • Update : BWS plugins section is updated.
  • Bugfix : Button intermittently showing/not showing has been fixed.
Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Facebook Button by BestWebSoft
Version 2.68
Comparing to
See all releases

Code changes from version 2.67 to 2.68

bws_menu/bws_functions.php CHANGED
@@ -605,7 +605,7 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
605
  };
606
  $( '." . $prefix . "_close_icon' ).click( function() {
607
  $( '." . $prefix . "_message' ).css( 'display', 'none' );
608
- $.cookie( '" . $prefix . "_hide_banner_on_plugin_page', 'true', { expires: 32 } );
609
  });
610
  });
611
  })(jQuery);";
@@ -631,7 +631,7 @@ if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) ) {
631
  }
632
  $( '." . $banner_value['prefix'] . "_close_icon' ).click( function() {
633
  $( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'none' );
634
- $.cookie( '" . $banner_value['prefix'] . "_timeout_hide_banner_on_plugin_page', 'true', { expires: 30 } );
635
  });";
636
  }
637
 
605
  };
606
  $( '." . $prefix . "_close_icon' ).click( function() {
607
  $( '." . $prefix . "_message' ).css( 'display', 'none' );
608
+ $.cookie( '" . $prefix . "_hide_banner_on_plugin_page', 'true', { expires: 32, secure: true } );
609
  });
610
  });
611
  })(jQuery);";
631
  }
632
  $( '." . $banner_value['prefix'] . "_close_icon' ).click( function() {
633
  $( '." . $banner_value['prefix'] . "_message_timeout' ).css( 'display', 'none' );
634
+ $.cookie( '" . $banner_value['prefix'] . "_timeout_hide_banner_on_plugin_page', 'true', { expires: 30, secure: true } );
635
  });";
636
  }
637
 
bws_menu/bws_menu.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
- * Version: 2.3.0
5
  */
6
 
7
  if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) )
@@ -547,7 +547,7 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
547
  <?php } elseif ( $is_installed ) { ?>
548
  <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a>
549
  <?php } else {
550
- $install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : self_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ); ?>
551
  <a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php _e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php _e( 'Install Now', 'bestwebsoft' ); ?></a>
552
  <?php }
553
  } ?>
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
+ * Version: 2.3.3
5
  */
6
 
7
  if ( ! function_exists ( 'bws_admin_enqueue_scripts' ) )
547
  <?php } elseif ( $is_installed ) { ?>
548
  <a class="button button-secondary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( $current_page . '&bws_activate_plugin=' . $key_plugin ), 'bws_activate_plugin' . $key_plugin ) ); ?>" title="<?php _e( 'Activate this plugin', 'bestwebsoft' ); ?>"><?php _e( 'Activate', 'bestwebsoft' ); ?></a>
549
  <?php } else {
550
+ $install_url = isset( $value_plugin['install_url'] ) ? $value_plugin['install_url'] : network_admin_url( 'plugin-install.php?tab=search&type=term&s=' . str_replace( array( ' ', '-' ), '+', str_replace( '&', '', $value_plugin['name'] ) ) . '+BestWebSoft&plugin-search-input=Search+Plugins' ); ?>
551
  <a class="button button-secondary" href="<?php echo esc_url( $install_url ); ?>" title="<?php _e( 'Install this plugin', 'bestwebsoft' ); ?>" target="_blank"><?php _e( 'Install Now', 'bestwebsoft' ); ?></a>
552
  <?php }
553
  } ?>
bws_menu/class-bws-settings.php CHANGED
@@ -10,6 +10,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
10
  private $tabs;
11
  private $pro_plugin_is_activated = false;
12
  private $custom_code_args = array();
 
13
 
14
  public $plugin_basename;
15
  public $prefix;
@@ -53,6 +54,8 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
53
  * @param array|string $args
54
  */
55
  public function __construct( $args = array() ) {
 
 
56
  $args = wp_parse_args( $args, array(
57
  'plugin_basename' => '',
58
  'prefix' => '',
@@ -66,8 +69,6 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
66
  'wp_slug' => '',
67
  'demo_data' => false,
68
  /* if this is free version and pro exist */
69
- 'pro_page' => '',
70
- 'bws_license_plugin' => '',
71
  'link_key' => '',
72
  'link_pn' => '',
73
  'trial_days' => false,
@@ -90,14 +91,27 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
90
  $this->doc_link = $args['doc_link'];
91
  $this->doc_video_link = $args['doc_video_link'];
92
 
93
- $this->pro_page = $args['pro_page'];
94
- $this->bws_license_plugin = $args['bws_license_plugin'];
95
  $this->link_key = $args['link_key'];
96
  $this->link_pn = $args['link_pn'];
97
  $this->trial_days = $args['trial_days'];
98
  $this->licenses = $args['licenses'];
99
 
100
- $this->hide_pro_tabs = bws_hide_premium_options_check( $this->options );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  $this->version = '1.0.0';
102
  $this->is_multisite = is_multisite();
103
 
@@ -112,7 +126,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
112
  $this->licenses[ $this->plugins_info['TextDomain'] ] = array(
113
  'name' => $this->plugins_info['Name'],
114
  'slug' => $this->plugins_info['TextDomain'],
115
- 'pro_slug' => stristr( $this->bws_license_plugin, '/', TRUE ),
116
  'basename' => $this->plugin_basename,
117
  'pro_basename' => $this->bws_license_plugin
118
  );
@@ -234,8 +248,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
234
  * @param void
235
  * @return void
236
  */
237
- public function display_tabs() {
238
- global $wp_version; ?>
239
  <div id="bws_settings_tabs_wrapper">
240
  <ul id="bws_settings_tabs">
241
  <?php $this->display_tabs_list(); ?>
@@ -762,19 +775,15 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
762
  </tr>
763
  </table>
764
  <?php } else {
765
- $attr = '';
766
  if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] ) &&
767
  '5' < $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] &&
768
  $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) )
769
  $attr = 'disabled="disabled"';
770
 
771
-
772
- $license_key = '';
773
- if( ! empty( $single_license['pro_basename'] ) ) {
774
  $license_key = ! empty( $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] ) ? $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] : '';
775
- }
776
- $current_plugin_link = ( ! empty( $this->link_key ) && ! empty( $this->link_pn ) ? esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $this->wp_slug . '/' . '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info["Version"] . '&wp_v=' . $wp_version ) : esc_url( 'https://bestwebsoft.com/products/wordpress/plugins/' . $this->wp_slug . '/' ) );
777
- ?>
778
  <table class="form-table">
779
  <tr>
780
  <th scope="row"><?php echo $pro_plugin_name . ' License'; ?></th>
@@ -783,7 +792,7 @@ if ( ! class_exists( 'Bws_Settings_Tabs' ) ) {
783
  <input <?php echo $attr; ?> type="hidden" name="bws_license_plugin_<?php echo ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug']; ?>" value="<?php echo esc_attr( ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug'] ); ?>" />
784
  <input <?php echo $attr; ?> type="submit" class="button button-secondary" name="bws_license_submit" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" />
785
  <div class="bws_info">
786
- <?php printf( __( 'Enter your license key to activate %s and get premium plugin features.', 'bestwebsoft' ), '<a href="' . $current_plugin_link . '" target="_blank" title="' . $pro_plugin_name . '">' . $pro_plugin_name . '</a>' ); ?>
787
  </div>
788
  <?php if ( '' != $attr ) { ?>
789
  <p><?php _e( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'bestwebsoft' ); ?></p>
10
  private $tabs;
11
  private $pro_plugin_is_activated = false;
12
  private $custom_code_args = array();
13
+ private $bws_plugin_link = '';
14
 
15
  public $plugin_basename;
16
  public $prefix;
54
  * @param array|string $args
55
  */
56
  public function __construct( $args = array() ) {
57
+ global $wp_version;
58
+
59
  $args = wp_parse_args( $args, array(
60
  'plugin_basename' => '',
61
  'prefix' => '',
69
  'wp_slug' => '',
70
  'demo_data' => false,
71
  /* if this is free version and pro exist */
 
 
72
  'link_key' => '',
73
  'link_pn' => '',
74
  'trial_days' => false,
91
  $this->doc_link = $args['doc_link'];
92
  $this->doc_video_link = $args['doc_video_link'];
93
 
 
 
94
  $this->link_key = $args['link_key'];
95
  $this->link_pn = $args['link_pn'];
96
  $this->trial_days = $args['trial_days'];
97
  $this->licenses = $args['licenses'];
98
 
99
+ $this->pro_page = $this->bws_license_plugin = '';
100
+ /* get $bws_plugins */
101
+ require( dirname( __FILE__ ) . '/product_list.php' );
102
+ if ( isset( $bws_plugins[ $this->plugin_basename ] ) ) {
103
+ if ( isset( $bws_plugins[ $this->plugin_basename ]['pro_settings'] ) ) {
104
+ $this->pro_page = $bws_plugins[ $this->plugin_basename ]['pro_settings'];
105
+ $this->bws_license_plugin = $bws_plugins[ $this->plugin_basename ]['pro_version'];
106
+ }
107
+
108
+ $this->bws_plugin_link = substr( $bws_plugins[ $this->plugin_basename ]['link'],0 , strpos( $bws_plugins[ $this->plugin_basename ]['link'], '?' ) );
109
+
110
+ if ( ! empty( $this->link_key ) && ! empty( $this->link_pn ) )
111
+ $this->bws_plugin_link .= '?k=' . $this->link_key . '&pn=' . $this->link_pn . '&v=' . $this->plugins_info["Version"] . '&wp_v=' . $wp_version;
112
+ }
113
+
114
+ $this->hide_pro_tabs = bws_hide_premium_options_check( $this->options );
115
  $this->version = '1.0.0';
116
  $this->is_multisite = is_multisite();
117
 
126
  $this->licenses[ $this->plugins_info['TextDomain'] ] = array(
127
  'name' => $this->plugins_info['Name'],
128
  'slug' => $this->plugins_info['TextDomain'],
129
+ 'pro_slug' => substr( $this->bws_license_plugin, 0, stripos( $this->bws_license_plugin, '/' ) ),
130
  'basename' => $this->plugin_basename,
131
  'pro_basename' => $this->bws_license_plugin
132
  );
248
  * @param void
249
  * @return void
250
  */
251
+ public function display_tabs() { ?>
 
252
  <div id="bws_settings_tabs_wrapper">
253
  <ul id="bws_settings_tabs">
254
  <?php $this->display_tabs_list(); ?>
775
  </tr>
776
  </table>
777
  <?php } else {
778
+ $attr = $license_key = '';
779
  if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] ) &&
780
  '5' < $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['count'] &&
781
  $bstwbsftwppdtplgns_options['go_pro'][ $this->bws_license_plugin ]['time'] > ( time() - ( 24 * 60 * 60 ) ) )
782
  $attr = 'disabled="disabled"';
783
 
784
+ if ( ! empty( $single_license['pro_basename'] ) ) {
 
 
785
  $license_key = ! empty( $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] ) ? $bstwbsftwppdtplgns_options[ $single_license['pro_basename'] ] : '';
786
+ } ?>
 
 
787
  <table class="form-table">
788
  <tr>
789
  <th scope="row"><?php echo $pro_plugin_name . ' License'; ?></th>
792
  <input <?php echo $attr; ?> type="hidden" name="bws_license_plugin_<?php echo ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug']; ?>" value="<?php echo esc_attr( ( ! empty( $single_license['pro_slug'] ) ) ? $single_license['pro_slug'] : $single_license['slug'] ); ?>" />
793
  <input <?php echo $attr; ?> type="submit" class="button button-secondary" name="bws_license_submit" value="<?php _e( 'Activate', 'bestwebsoft' ); ?>" />
794
  <div class="bws_info">
795
+ <?php printf( __( 'Enter your license key to activate %s and get premium plugin features.', 'bestwebsoft' ), '<a href="' . $this->bws_plugin_link . '" target="_blank" title="' . $pro_plugin_name . '">' . $pro_plugin_name . '</a>' ); ?>
796
  </div>
797
  <?php if ( '' != $attr ) { ?>
798
  <p><?php _e( "Unfortunately, you have exceeded the number of available tries per day. Please, upload the plugin manually.", 'bestwebsoft' ); ?></p>
bws_menu/css/general_style.css CHANGED
@@ -661,6 +661,9 @@ span.bws_code {
661
  #bws_settings_tabs li.bws-tab-notifications a:before {
662
  content: "\f466";
663
  }
 
 
 
664
  #bws_settings_tabs li.bws-tab-output a:before {
665
  content: "\f498";
666
  }
661
  #bws_settings_tabs li.bws-tab-notifications a:before {
662
  content: "\f466";
663
  }
664
+ #bws_settings_tabs li.bws-tab-reports a:before {
665
+ content: "\f535";
666
+ }
667
  #bws_settings_tabs li.bws-tab-output a:before {
668
  content: "\f498";
669
  }
bws_menu/deactivation-form.php CHANGED
@@ -360,7 +360,7 @@ if ( ! function_exists( 'bws_submit_uninstall_reason_action' ) ) {
360
  exit;
361
  }
362
 
363
- $reason_info = isset( $_REQUEST['reason_info'] ) ? stripcslashes( sanitize_textarea_field( $_REQUEST['reason_info'] ) ) : '';
364
  if ( ! empty( $reason_info ) ) {
365
  $reason_info = substr( $reason_info, 0, 255 );
366
  }
360
  exit;
361
  }
362
 
363
+ $reason_info = isset( $_REQUEST['reason_info'] ) ? stripcslashes( sanitize_text_field( $_REQUEST['reason_info'] ) ) : '';
364
  if ( ! empty( $reason_info ) ) {
365
  $reason_info = substr( $reason_info, 0, 255 );
366
  }
bws_menu/js/bws_tooltip.js CHANGED
@@ -9,7 +9,7 @@
9
  /* extend pointer options - add close button */
10
  pointer_options = $.extend( pointer_options, {
11
  buttons: function(event, t) {
12
- var button;
13
  /* check and add dismiss-type buttons */
14
  for ( var but in pointer_buttons ) {
15
  if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] == 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
9
  /* extend pointer options - add close button */
10
  pointer_options = $.extend( pointer_options, {
11
  buttons: function(event, t) {
12
+ var button = '';
13
  /* check and add dismiss-type buttons */
14
  for ( var but in pointer_buttons ) {
15
  if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] == 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
facebook-button-plugin.php CHANGED
@@ -6,7 +6,7 @@ Description: Add Facebook Like, Share and Profile buttons to WordPress posts, pa
6
  Author: BestWebSoft
7
  Text Domain: facebook-button-plugin
8
  Domain Path: /languages
9
- Version: 2.67
10
  Author URI: https://bestwebsoft.com/
11
  License: GPLv2 or later
12
  */
@@ -559,7 +559,8 @@ if ( ! function_exists( 'fcbkbttn_footer_script' ) ) {
559
  <div id="fb-root"></div>
560
  <?php $locale = fcbkbttn_get_locale();
561
  $app_id = $fcbkbttn_options['id'];
562
- wp_register_script( 'fcbkbttn_sdk_script', "https://connect.facebook.net/{$locale}/sdk.js#xfbml=1&version=v6.0&appId={$app_id}&autoLogAppEvents=1");
 
563
  wp_enqueue_script( 'fcbkbttn_sdk_script' );
564
  }
565
  }
6
  Author: BestWebSoft
7
  Text Domain: facebook-button-plugin
8
  Domain Path: /languages
9
+ Version: 2.68
10
  Author URI: https://bestwebsoft.com/
11
  License: GPLv2 or later
12
  */
559
  <div id="fb-root"></div>
560
  <?php $locale = fcbkbttn_get_locale();
561
  $app_id = $fcbkbttn_options['id'];
562
+ $fcbkbttn_sdk_script = "https://connect.facebook.net/{$locale}/sdk.js#xfbml=1&version=v6.0&appId={$app_id}&autoLogAppEvents=1";
563
+ wp_register_script( 'fcbkbttn_sdk_script', htmlspecialchars_decode( $fcbkbttn_sdk_script ) );
564
  wp_enqueue_script( 'fcbkbttn_sdk_script' );
565
  }
566
  }
includes/class-fcbkbttn-settings.php CHANGED
@@ -35,8 +35,6 @@ if ( ! class_exists( 'Fcbkbttn_Settings_Tabs' ) ) {
35
  'tabs' => $tabs,
36
  'doc_link' => 'https://docs.google.com/document/d/1gy5uDVoebmYRUvlKRwBmc97jdJFz7GvUCtXy3L7r_Yg/',
37
  'wp_slug' => 'facebook-button-plugin',
38
- 'pro_page' => 'admin.php?page=facebook-button-pro.php',
39
- 'bws_license_plugin'=> 'facebook-button-pro/facebook-button-pro.php',
40
  'link_key' => '427287ceae749cbd015b4bba6041c4b8',
41
  'link_pn' => '78'
42
  ) );
35
  'tabs' => $tabs,
36
  'doc_link' => 'https://docs.google.com/document/d/1gy5uDVoebmYRUvlKRwBmc97jdJFz7GvUCtXy3L7r_Yg/',
37
  'wp_slug' => 'facebook-button-plugin',
 
 
38
  'link_key' => '427287ceae749cbd015b4bba6041c4b8',
39
  'link_pn' => '78'
40
  ) );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bestwebsoft
3
  Donate link: https://bestwebsoft.com/donate/
4
  Tags: facebook buttons, share, like, add share button, social buttons, facebook, facebook button icon, follow, follow button, like button, share button, facebook plugin
5
  Requires at least: 4.5
6
- Tested up to: 5.4.1
7
- Stable tag: 2.67
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -163,6 +163,11 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
163
 
164
  == Changelog ==
165
 
 
 
 
 
 
166
  = V2.67 - 06.05.2020 =
167
  * Bugfix : The compatibility with Graph API v6.0 has been fixed.
168
  * Update : BWS plugins section is updated.
@@ -431,6 +436,10 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
431
 
432
  == Upgrade Notice ==
433
 
 
 
 
 
434
  = V2.67 =
435
  * Plugin optimization completed.
436
  * Bugs fixed.
3
  Donate link: https://bestwebsoft.com/donate/
4
  Tags: facebook buttons, share, like, add share button, social buttons, facebook, facebook button icon, follow, follow button, like button, share button, facebook plugin
5
  Requires at least: 4.5
6
+ Tested up to: 5.5
7
+ Stable tag: 2.68
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
163
 
164
  == Changelog ==
165
 
166
+ = V2.68 - 26.08.2020 =
167
+ * Update : All functionality was updated for WordPress 5.5.
168
+ * Update : BWS plugins section is updated.
169
+ * Bugfix : Button intermittently showing/not showing has been fixed.
170
+
171
  = V2.67 - 06.05.2020 =
172
  * Bugfix : The compatibility with Graph API v6.0 has been fixed.
173
  * Update : BWS plugins section is updated.
436
 
437
  == Upgrade Notice ==
438
 
439
+ = V2.68 =
440
+ * The compatibility with new WordPress version updated.
441
+ * Bugs fixed.
442
+
443
  = V2.67 =
444
  * Plugin optimization completed.
445
  * Bugs fixed.