Facebook Button by BestWebSoft - Version 2.60

Version Description

  • 26.11.2018 =
  • Bugfix: The compatibility with Custom Admin Page plugin has been fixed.
  • Bugfix: The compatibility with Graph API v3.2 has been fixed.
Download this release

Release Info

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

Code changes from version 2.59 to 2.60

facebook-button-plugin.php CHANGED
@@ -6,13 +6,12 @@ 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.59
10
  Author URI: https://bestwebsoft.com/
11
  License: GPLv2 or later
12
  */
13
- require_once( dirname( __FILE__ ) . '/includes/deprecated.php' );
14
 
15
- /* Copyright 2017 BestWebSoft ( https://support.bestwebsoft.com )
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
@@ -32,18 +31,41 @@ require_once( dirname( __FILE__ ) . '/includes/deprecated.php' );
32
  if ( ! function_exists( 'fcbkbttn_admin_menu' ) ) {
33
  function fcbkbttn_admin_menu() {
34
  global $submenu, $fcbkbttn_plugin_info, $wp_version;
35
-
36
- $settings = add_menu_page( __( 'Facebook Button Settings', 'facebook-button-plugin' ), 'Facebook Button', 'manage_options', 'facebook-button-plugin.php', 'fcbkbttn_settings_page', 'dashicons-facebook-alt' );
37
- add_submenu_page( 'facebook-button-plugin.php', __( 'Facebook Button Settings', 'facebook-button-plugin' ), __( 'Settings', 'facebook-button-plugin' ), 'manage_options', 'facebook-button-plugin.php', 'fcbkbttn_settings_page' );
38
-
39
- add_submenu_page( 'facebook-button-plugin.php', 'BWS Panel', 'BWS Panel', 'manage_options', 'fcbkbttn-bws-panel', 'bws_add_menu_render' );
40
- if ( isset( $submenu['facebook-button-plugin.php'] ) )
41
- $submenu['facebook-button-plugin.php'][] = array(
42
- '<span style="color:#d86463"> ' . __( 'Upgrade to Pro', 'facebook-button-plugin' ) . '</span>',
43
- 'manage_options',
44
- 'https://bestwebsoft.com/products/wordpress/plugins/facebook-like-button/?k=427287ceae749cbd015b4bba6041c4b8&pn=78&v=' . $fcbkbttn_plugin_info["Version"] . '&wp_v=' . $wp_version );
45
-
46
- add_action( 'load-' . $settings, 'fcbkbttn_add_tabs' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
  }
49
  /* end fcbkbttn_admin_menu */
@@ -61,8 +83,9 @@ if ( ! function_exists( 'fcbkbttn_init' ) ) {
61
  global $fcbkbttn_plugin_info, $fcbkbttn_lang_codes, $fcbkbttn_options;
62
 
63
  if ( empty( $fcbkbttn_plugin_info ) ) {
64
- if ( ! function_exists( 'get_plugin_data' ) )
65
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
 
66
  $fcbkbttn_plugin_info = get_plugin_data( __FILE__ );
67
  }
68
 
@@ -124,18 +147,6 @@ if ( ! function_exists( 'fcbkbttn_settings' ) ) {
124
  $fcbkbttn_options = get_option( 'fcbkbttn_options' );
125
 
126
  if ( ! isset( $fcbkbttn_options['plugin_option_version'] ) || $fcbkbttn_options['plugin_option_version'] != $fcbkbttn_plugin_info["Version"] ) {
127
- /**
128
- * @deprecated since 2.57
129
- * @todo remove after 20.04.2018
130
- */
131
- if (
132
- isset( $fcbkbttn_options['plugin_option_version'] ) &&
133
- version_compare( $fcbkbttn_options['plugin_option_version'] , '2.57', '<' ) &&
134
- function_exists( 'fcbkbttn_update_options' )
135
- ) {
136
- fcbkbttn_update_options();
137
- }
138
- /* end deprecated */
139
  $fcbkbttn_options['hide_premium_options'] = array();
140
 
141
  fcbkbttn_plugin_activate();
@@ -223,87 +234,88 @@ if ( ! function_exists( 'fcbkbttn_button' ) ) {
223
  function fcbkbttn_button() {
224
  global $post, $fcbkbttn_options;
225
 
226
- if ( isset( $post->ID ) ) {
227
- $permalink_post = get_permalink( $post->ID );
228
- }
229
-
230
- $if_large = '';
231
- if ( $fcbkbttn_options['size'] == 'large' ) {
232
- $if_large = 'fcbkbttn_large_button';
233
- }
234
-
235
- if ( 'right' == $fcbkbttn_options['location'] ) {
236
- $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_right">';
237
- } elseif ( 'middle' == $fcbkbttn_options['location'] ) {
238
- $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_middle">';
239
- } elseif ( 'left' == $fcbkbttn_options['location'] ) {
240
- $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_left">';
241
- }
242
- if ( ! empty( $fcbkbttn_options['my_page'] ) ) {
243
- $button .= '<div class="fcbkbttn_button">
244
- <a href="https://www.facebook.com/' . $fcbkbttn_options['link'] . '" target="_blank">
245
- <img src="' . $fcbkbttn_options['fb_img_link'] . '" alt="Fb-Button" />
246
- </a>
247
- </div>';
248
- }
249
-
250
- $location_share = ( 'right' == $fcbkbttn_options['location'] && "standard" == $fcbkbttn_options['layout_like_option'] ) ? 1 : 0;
251
-
252
- if ( ! empty( $fcbkbttn_options['share'] ) && ! empty( $location_share ) ) {
253
- $button .= '<div class="fb-share-button ' . $if_large . ' " data-href="' . $permalink_post . '" data-type="' . $fcbkbttn_options['layout_share_option'] . '" data-size="' . $fcbkbttn_options['size'] . '"></div>';
254
- }
255
-
256
- if ( ! empty( $fcbkbttn_options['like'] ) ) {
257
- $button .= '<div class="fcbkbttn_like ' . $if_large . '">';
258
-
259
- if ( ! empty( $fcbkbttn_options['html5'] ) ) {
260
- $button .= '<div class="fb-like fb-like-'. $fcbkbttn_options['layout_like_option'] .'" data-href="' . $permalink_post . '" data-colorscheme="' . $fcbkbttn_options['color_scheme'] . '" data-layout="' . $fcbkbttn_options['layout_like_option'] . '" data-action="' . $fcbkbttn_options['like_action'] . '" ';
261
- if ( 'standard' == $fcbkbttn_options['layout_like_option'] ) {
262
- $button .= ' data-width="' . $fcbkbttn_options['width'] . 'px"';
263
- $button .= ( ! empty( $fcbkbttn_options['faces'] ) ) ? " data-show-faces='true'" : " data-show-faces='false'";
264
- }
265
- $button .= ' data-size="' . $fcbkbttn_options['size'] . '"';
266
- $button .= '></div></div>';
267
- } else {
268
- $button .= '<fb:like href="' . $permalink_post . '" action="' . $fcbkbttn_options['like_action'] . '" colorscheme="' . $fcbkbttn_options['color_scheme'] . '" layout="' . $fcbkbttn_options['layout_like_option'] . '" ';
269
- if ( 'standard' == $fcbkbttn_options['layout_like_option'] ) {
270
- $button .= ( ! empty( $fcbkbttn_options['faces'] ) ) ? "show-faces='true'" : "show-faces='false'";
271
- $button .= ' width="' . $fcbkbttn_options['width'] . 'px"';
272
- }
273
-
274
- $button .= ' size="' . $fcbkbttn_options['size'] . '"';
275
- $button .= '></fb:like></div>';
276
- }
277
- }
278
- if ( ! empty( $fcbkbttn_options['share'] ) && empty( $location_share ) ) {
279
- $button .= '<div class="fb-share-button ' . $if_large . ' " data-href="' . $permalink_post . '" data-type="' . $fcbkbttn_options['layout_share_option'] . '" data-size="' . $fcbkbttn_options['size'] . '"></div>';
280
- }
281
-
282
- $button .= '</div>';
283
-
284
- return $button;
285
  }
286
  }
287
 
288
  /* Function taking from array 'fcbkbttn_options' necessary information to create Facebook Button and reacting to your choise in plugin menu - points where it appears. */
289
  if ( ! function_exists( 'fcbkbttn_display_button' ) ) {
290
  function fcbkbttn_display_button( $content ) {
291
-
292
- if ( is_feed() ) {
293
- return $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  }
295
-
296
- global $fcbkbttn_options;
297
-
298
- $button = apply_filters( 'fcbkbttn_button_in_the_content', fcbkbttn_button() );
299
- /* Indication where show Facebook Button depending on selected item in admin page. */
300
- if ( ! empty( $fcbkbttn_options['where'] ) && in_array( 'before', $fcbkbttn_options['where'] ) ) {
301
- $content = $button . $content;
302
- }
303
- if ( ! empty( $fcbkbttn_options['where'] ) && in_array( 'after', $fcbkbttn_options['where'] ) ) {
304
- $content .= $button;
305
- }
306
-
307
  return $content;
308
  }
309
  }
@@ -313,8 +325,9 @@ if ( ! function_exists( 'fcbkbttn_shortcode' ) ) {
313
  function fcbkbttn_shortcode( $content ) {
314
  global $post, $fcbkbttn_options, $fcbkbttn_shortcode_add_script;
315
 
316
- if ( isset( $post->ID ) )
317
  $permalink_post = get_permalink( $post->ID );
 
318
 
319
  $button = fcbkbttn_button();
320
 
@@ -410,16 +423,24 @@ if ( ! function_exists( 'fcbkbttn_footer_script' ) ) {
410
  ( ( ! empty( $fcbkbttn_options['like'] ) || ! empty( $fcbkbttn_options['share'] ) ) && ! empty( $fcbkbttn_options['where'] ) )
411
  || defined( 'BWS_ENQUEUE_ALL_SCRIPTS' ) ) { ?>
412
  <div id="fb-root"></div>
413
- <script>(function(d, s, id) {
414
- var js, fjs = d.getElementsByTagName(s)[0];
415
-
416
- if (d.getElementById(id)) return;
417
- js = d.createElement(s); js.id = id;
418
-
419
- js.src = "//connect.facebook.net/<?php echo fcbkbttn_get_locale(); ?>/sdk.js#xfbml=1&appId=<?php echo $fcbkbttn_options['id']; ?>&version=v2.12";
420
- fjs.parentNode.insertBefore(js, fjs);
421
- }(document, 'script', 'facebook-jssdk'));
422
- </script>
 
 
 
 
 
 
 
 
423
  <?php }
424
  }
425
  }
@@ -519,14 +540,16 @@ if ( ! function_exists ( 'fcbkbttn_plugin_banner' ) ) {
519
  /* Function for delete options */
520
  if ( ! function_exists( 'fcbkbttn_delete_options' ) ) {
521
  function fcbkbttn_delete_options() {
522
- if ( ! function_exists( 'get_plugins' ) )
523
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
 
524
  $all_plugins = get_plugins();
525
 
526
  if ( ! array_key_exists( 'bws-social-buttons/bws-social-buttons.php', $all_plugins ) &&
527
  ! array_key_exists( 'bws-social-buttons-pro/bws-social-buttons-pro.php', $all_plugins ) &&
528
  ! array_key_exists( 'facebook-button-pro/facebook-button-pro.php', $all_plugins ) &&
529
- ! array_key_exists( 'facebook-button-plus/facebook-button-plus.php', $all_plugins ) ) {
 
530
  /* delete custom images if no PRO version */
531
  $upload_dir = wp_upload_dir();
532
  $fcbkbttn_cstm_mg_folder = $upload_dir['basedir'] . '/facebook-image/';
6
  Author: BestWebSoft
7
  Text Domain: facebook-button-plugin
8
  Domain Path: /languages
9
+ Version: 2.60
10
  Author URI: https://bestwebsoft.com/
11
  License: GPLv2 or later
12
  */
 
13
 
14
+ /* Copyright 2018 BestWebSoft ( https://support.bestwebsoft.com )
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License, version 2, as
31
  if ( ! function_exists( 'fcbkbttn_admin_menu' ) ) {
32
  function fcbkbttn_admin_menu() {
33
  global $submenu, $fcbkbttn_plugin_info, $wp_version;
34
+ if ( ! is_plugin_active( 'facebook-button-pro/facebook-button-pro.php') &&
35
+ ! is_plugin_active( 'facebook-button-plus/facebook-button-plus.php')
36
+ ) {
37
+ $settings = add_menu_page(
38
+ __( 'Facebook Button Settings', 'facebook-button-plugin' ),
39
+ 'Facebook Button', 'manage_options',
40
+ 'facebook-button-plugin.php',
41
+ 'fcbkbttn_settings_page',
42
+ 'dashicons-facebook-alt'
43
+ );
44
+ add_submenu_page(
45
+ 'facebook-button-plugin.php',
46
+ __( 'Facebook Button Settings', 'facebook-button-plugin' ),
47
+ __( 'Settings', 'facebook-button-plugin' ),
48
+ 'manage_options',
49
+ 'facebook-button-plugin.php',
50
+ 'fcbkbttn_settings_page'
51
+ );
52
+ add_submenu_page(
53
+ 'facebook-button-plugin.php',
54
+ 'BWS Panel',
55
+ 'BWS Panel',
56
+ 'manage_options',
57
+ 'fcbkbttn-bws-panel',
58
+ 'bws_add_menu_render'
59
+ );
60
+ if ( isset( $submenu['facebook-button-plugin.php'] ) ) {
61
+ $submenu['facebook-button-plugin.php'][] = array(
62
+ '<span style="color:#d86463"> ' . __( 'Upgrade to Pro', 'facebook-button-plugin' ) . '</span>',
63
+ 'manage_options',
64
+ 'https://bestwebsoft.com/products/wordpress/plugins/facebook-like-button/?k=427287ceae749cbd015b4bba6041c4b8&pn=78&v=' . $fcbkbttn_plugin_info["Version"] . '&wp_v=' . $wp_version
65
+ );
66
+ }
67
+ add_action( 'load-' . $settings, 'fcbkbttn_add_tabs' );
68
+ }
69
  }
70
  }
71
  /* end fcbkbttn_admin_menu */
83
  global $fcbkbttn_plugin_info, $fcbkbttn_lang_codes, $fcbkbttn_options;
84
 
85
  if ( empty( $fcbkbttn_plugin_info ) ) {
86
+ if ( ! function_exists( 'get_plugin_data' ) ) {
87
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
88
+ }
89
  $fcbkbttn_plugin_info = get_plugin_data( __FILE__ );
90
  }
91
 
147
  $fcbkbttn_options = get_option( 'fcbkbttn_options' );
148
 
149
  if ( ! isset( $fcbkbttn_options['plugin_option_version'] ) || $fcbkbttn_options['plugin_option_version'] != $fcbkbttn_plugin_info["Version"] ) {
 
 
 
 
 
 
 
 
 
 
 
 
150
  $fcbkbttn_options['hide_premium_options'] = array();
151
 
152
  fcbkbttn_plugin_activate();
234
  function fcbkbttn_button() {
235
  global $post, $fcbkbttn_options;
236
 
237
+ if ( isset( $post->ID ) ) {
238
+ $permalink_post = get_permalink( $post->ID );
239
+ }
240
+
241
+ $if_large = '';
242
+ if ( $fcbkbttn_options['size'] == 'large' ) {
243
+ $if_large = 'fcbkbttn_large_button';
244
+ }
245
+
246
+ if ( 'right' == $fcbkbttn_options['location'] ) {
247
+ $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_right">';
248
+ } elseif ( 'middle' == $fcbkbttn_options['location'] ) {
249
+ $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_middle">';
250
+ } elseif ( 'left' == $fcbkbttn_options['location'] ) {
251
+ $button = '<div class="fcbkbttn_buttons_block" id="fcbkbttn_left">';
252
+ }
253
+ if ( ! empty( $fcbkbttn_options['my_page'] ) ) {
254
+ $button .= '<div class="fcbkbttn_button">
255
+ <a href="https://www.facebook.com/' . $fcbkbttn_options['link'] . '" target="_blank">
256
+ <img src="' . $fcbkbttn_options['fb_img_link'] . '" alt="Fb-Button" />
257
+ </a>
258
+ </div>';
259
+ }
260
+
261
+ $location_share = ( 'right' == $fcbkbttn_options['location'] && "standard" == $fcbkbttn_options['layout_like_option'] ) ? 1 : 0;
262
+
263
+ if ( ! empty( $fcbkbttn_options['share'] ) && ! empty( $location_share ) ) {
264
+ $button .= '<div class="fb-share-button ' . $if_large . ' " data-href="' . $permalink_post . '" data-type="' . $fcbkbttn_options['layout_share_option'] . '" data-size="' . $fcbkbttn_options['size'] . '"></div>';
265
+ }
266
+
267
+ if ( ! empty( $fcbkbttn_options['like'] ) ) {
268
+ $button .= '<div class="fcbkbttn_like ' . $if_large . '">';
269
+
270
+ if ( ! empty( $fcbkbttn_options['html5'] ) ) {
271
+ $button .= '<div class="fb-like fb-like-'. $fcbkbttn_options['layout_like_option'] .'" data-href="' . $permalink_post . '" data-colorscheme="' . $fcbkbttn_options['color_scheme'] . '" data-layout="' . $fcbkbttn_options['layout_like_option'] . '" data-action="' . $fcbkbttn_options['like_action'] . '" ';
272
+ if ( 'standard' == $fcbkbttn_options['layout_like_option'] ) {
273
+ $button .= ' data-width="' . $fcbkbttn_options['width'] . 'px"';
274
+ $button .= ( ! empty( $fcbkbttn_options['faces'] ) ) ? " data-show-faces='true'" : " data-show-faces='false'";
275
+ }
276
+ $button .= ' data-size="' . $fcbkbttn_options['size'] . '"';
277
+ $button .= '></div></div>';
278
+ } else {
279
+ $button .= '<fb:like href="' . $permalink_post . '" action="' . $fcbkbttn_options['like_action'] . '" colorscheme="' . $fcbkbttn_options['color_scheme'] . '" layout="' . $fcbkbttn_options['layout_like_option'] . '" ';
280
+ if ( 'standard' == $fcbkbttn_options['layout_like_option'] ) {
281
+ $button .= ( ! empty( $fcbkbttn_options['faces'] ) ) ? "show-faces='true'" : "show-faces='false'";
282
+ $button .= ' width="' . $fcbkbttn_options['width'] . 'px"';
283
+ }
284
+
285
+ $button .= ' size="' . $fcbkbttn_options['size'] . '"';
286
+ $button .= '></fb:like></div>';
287
+ }
288
+ }
289
+ if ( ! empty( $fcbkbttn_options['share'] ) && empty( $location_share ) ) {
290
+ $button .= '<div class="fb-share-button ' . $if_large . ' " data-href="' . $permalink_post . '" data-type="' . $fcbkbttn_options['layout_share_option'] . '" data-size="' . $fcbkbttn_options['size'] . '"></div>';
291
+ }
292
+
293
+ $button .= '</div>';
294
+
295
+ return $button;
296
  }
297
  }
298
 
299
  /* Function taking from array 'fcbkbttn_options' necessary information to create Facebook Button and reacting to your choise in plugin menu - points where it appears. */
300
  if ( ! function_exists( 'fcbkbttn_display_button' ) ) {
301
  function fcbkbttn_display_button( $content ) {
302
+ global $post;
303
+ if ( isset( $post ) ) {
304
+ if ( is_feed() ) {
305
+ return $content;
306
+ }
307
+
308
+ global $fcbkbttn_options;
309
+
310
+ $button = apply_filters( 'fcbkbttn_button_in_the_content', fcbkbttn_button() );
311
+ /* Indication where show Facebook Button depending on selected item in admin page. */
312
+ if ( ! empty( $fcbkbttn_options['where'] ) && in_array( 'before', $fcbkbttn_options['where'] ) ) {
313
+ $content = $button . $content;
314
+ }
315
+ if ( ! empty( $fcbkbttn_options['where'] ) && in_array( 'after', $fcbkbttn_options['where'] ) ) {
316
+ $content .= $button;
317
+ }
318
  }
 
 
 
 
 
 
 
 
 
 
 
 
319
  return $content;
320
  }
321
  }
325
  function fcbkbttn_shortcode( $content ) {
326
  global $post, $fcbkbttn_options, $fcbkbttn_shortcode_add_script;
327
 
328
+ if ( isset( $post->ID ) ) {
329
  $permalink_post = get_permalink( $post->ID );
330
+ }
331
 
332
  $button = fcbkbttn_button();
333
 
423
  ( ( ! empty( $fcbkbttn_options['like'] ) || ! empty( $fcbkbttn_options['share'] ) ) && ! empty( $fcbkbttn_options['where'] ) )
424
  || defined( 'BWS_ENQUEUE_ALL_SCRIPTS' ) ) { ?>
425
  <div id="fb-root"></div>
426
+ <script>
427
+ window.fbAsyncInit = function() {
428
+ FB.init({
429
+ appId : <?php echo $fcbkbttn_options['id']; ?>,
430
+ autoLogAppEvents : true,
431
+ xfbml : true,
432
+ version : 'v3.2'
433
+ });
434
+ };
435
+
436
+ (function(d, s, id){
437
+ var js, fjs = d.getElementsByTagName(s)[0];
438
+ if (d.getElementById(id)) {return;}
439
+ js = d.createElement(s); js.id = id;
440
+ js.src = "https://connect.facebook.net/<?php echo fcbkbttn_get_locale(); ?>/sdk.js";
441
+ fjs.parentNode.insertBefore(js, fjs);
442
+ }(document, 'script', 'facebook-jssdk'));
443
+ </script>
444
  <?php }
445
  }
446
  }
540
  /* Function for delete options */
541
  if ( ! function_exists( 'fcbkbttn_delete_options' ) ) {
542
  function fcbkbttn_delete_options() {
543
+ if ( ! function_exists( 'get_plugins' ) ) {
544
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
545
+ }
546
  $all_plugins = get_plugins();
547
 
548
  if ( ! array_key_exists( 'bws-social-buttons/bws-social-buttons.php', $all_plugins ) &&
549
  ! array_key_exists( 'bws-social-buttons-pro/bws-social-buttons-pro.php', $all_plugins ) &&
550
  ! array_key_exists( 'facebook-button-pro/facebook-button-pro.php', $all_plugins ) &&
551
+ ! array_key_exists( 'facebook-button-plus/facebook-button-plus.php', $all_plugins )
552
+ ) {
553
  /* delete custom images if no PRO version */
554
  $upload_dir = wp_upload_dir();
555
  $fcbkbttn_cstm_mg_folder = $upload_dir['basedir'] . '/facebook-image/';
includes/class-fcbkbttn-settings.php CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'Fcbkbttn_Settings_Tabs' ) ) {
24
  'display' => array( 'label' => __( 'Display', 'facebook-button-plugin' ), 'is_pro' => 1 ),
25
  'misc' => array( 'label' => __( 'Misc', 'facebook-button-plugin' ) ),
26
  'custom_code' => array( 'label' => __( 'Custom Code', 'facebook-button-plugin' ) ),
27
- 'license' => array( 'label' => __( 'License Key', 'facebook-button-plugin' ) ),
28
  );
29
 
30
  parent::__construct( array(
@@ -110,8 +110,9 @@ if ( ! class_exists( 'Fcbkbttn_Settings_Tabs' ) ) {
110
  $message = __( "Settings saved", 'facebook-button-plugin' );
111
 
112
  if ( ! empty( $_FILES['fcbkbttn_uploadfile']['tmp_name'] ) ) {
113
- if ( ! $this->upload_dir )
114
  $this->upload_dir = wp_upload_dir();
 
115
 
116
  if ( ! $this->upload_dir["error"] ) {
117
  $fcbkbttn_cstm_mg_folder = $this->upload_dir['basedir'] . '/facebook-image';
24
  'display' => array( 'label' => __( 'Display', 'facebook-button-plugin' ), 'is_pro' => 1 ),
25
  'misc' => array( 'label' => __( 'Misc', 'facebook-button-plugin' ) ),
26
  'custom_code' => array( 'label' => __( 'Custom Code', 'facebook-button-plugin' ) ),
27
+ 'license' => array( 'label' => __( 'License Key', 'facebook-button-plugin' ) )
28
  );
29
 
30
  parent::__construct( array(
110
  $message = __( "Settings saved", 'facebook-button-plugin' );
111
 
112
  if ( ! empty( $_FILES['fcbkbttn_uploadfile']['tmp_name'] ) ) {
113
+ if ( ! $this->upload_dir ) {
114
  $this->upload_dir = wp_upload_dir();
115
+ }
116
 
117
  if ( ! $this->upload_dir["error"] ) {
118
  $fcbkbttn_cstm_mg_folder = $this->upload_dir['basedir'] . '/facebook-image';
includes/deprecated.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- /**
3
- * Includes deprecated functions
4
- */
5
-
6
- /**
7
- * @deprecated since 2.56
8
- * @todo remove after 01.07.2018
9
- */
10
- if ( ! function_exists( 'fcbkbttn_update_options' ) ) {
11
- function fcbkbttn_update_options() {
12
- global $fcbkbttn_options;
13
-
14
- if ( isset( $fcbkbttn_options['layout_option'] ) ) {
15
- if( 'icon_link' == $fcbkbttn_options['layout_option'] || 'link' == $fcbkbttn_options['layout_option'] || 'icon' == $fcbkbttn_options['layout_option'] ) {
16
- $fcbkbttn_options['layout_like_option'] = 'standard';
17
- $fcbkbttn_options['layout_share_option'] = $fcbkbttn_options['layout_option'];
18
- } else if ( 'standard' == $fcbkbttn_options['layout_option'] ){
19
- $fcbkbttn_options['layout_like_option'] = $fcbkbttn_options['layout_option'];
20
- $fcbkbttn_options['layout_share_option'] = 'button_count';
21
- } else {
22
- $fcbkbttn_options['layout_like_option'] = $fcbkbttn_options['layout_share_option'] = $fcbkbttn_options['layout_option'];
23
- }
24
- unset( $fcbkbttn_options['layout_option'] );
25
- }
26
- }
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 3.9
6
- Tested up to: 4.9.6
7
- Stable tag: 2.59
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -162,10 +162,16 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
162
 
163
  == Changelog ==
164
 
 
 
 
 
165
  = V2.59 - 30.05.2018 =
166
  * Bugfix: Bug with incorrect Facebook buttons displaying has been fixed.
167
  * Bugfix: Bug with incorrect Facebook buttons preview has been fixed.
168
- * Bugfix: Compatibility with Graph API v2.12 has been fixed.
 
 
169
 
170
  = V2.58 - 12.03.2018 =
171
  * Bugfix : Bug with incorrect Facebook buttons displaying has been fixed.
@@ -400,6 +406,10 @@ Please make sure that the problem hasn't been discussed yet on our forum (<https
400
 
401
  == Upgrade Notice ==
402
 
 
 
 
 
403
  = V2.59 =
404
  * Bugs fixed.
405
 
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: 3.9
6
+ Tested up to: 5.0
7
+ Stable tag: 2.60
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
162
 
163
  == Changelog ==
164
 
165
+ = V2.60 - 26.11.2018 =
166
+ * Bugfix: The compatibility with Custom Admin Page plugin has been fixed.
167
+ * Bugfix: The compatibility with Graph API v3.2 has been fixed.
168
+
169
  = V2.59 - 30.05.2018 =
170
  * Bugfix: Bug with incorrect Facebook buttons displaying has been fixed.
171
  * Bugfix: Bug with incorrect Facebook buttons preview has been fixed.
172
+ * Bugfix: Compatibility with Graph = V2.60 =
173
+ * Bugs fixed.
174
+ * Usability improved. API v2.12 has been fixed.
175
 
176
  = V2.58 - 12.03.2018 =
177
  * Bugfix : Bug with incorrect Facebook buttons displaying has been fixed.
406
 
407
  == Upgrade Notice ==
408
 
409
+ = V2.60 =
410
+ * Bugs fixed.
411
+ * Usability improved.
412
+
413
  = V2.59 =
414
  * Bugs fixed.
415
 
screenshot-3.png CHANGED
Binary file