Facebook Button by BestWebSoft - Version 2.34

Version Description

  • 13.08.2014 =
  • Budfix : Security Exploit was fixed.
Download this release

Release Info

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

Code changes from version 2.33 to 2.34

bws_menu/bws_menu.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
- * Version: 1.3.6
5
  */
6
 
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
@@ -515,8 +515,8 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
515
  if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ) ) ||
516
  ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ) ) ) {
517
  if ( isset( $_REQUEST['bwsmn_form_email'] ) ) {
518
- $bwsmn_form_email = trim( $_REQUEST['bwsmn_form_email'] );
519
- if ( $bwsmn_form_email == "" || !preg_match( "/^((?:[a-z0-9']+(?:[a-z0-9\-_\.']+)?@[a-z0-9]+(?:[a-z0-9\-\.]+)?\.[a-z]{2,5})[, ]*)+$/i", $bwsmn_form_email ) ) {
520
  $error = __( "Please enter a valid email address.", 'bestwebsoft' );
521
  } else {
522
  $email = $bwsmn_form_email;
@@ -538,19 +538,24 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
538
  foreach ( $system_info['system_info'] as $key => $value ) {
539
  $message_text .= '<tr><td>'. $key .'</td><td>'. $value .'</td></tr>';
540
  }
541
- $message_text .= '</table>
542
- <h4>Active Plugins</h4>
543
- <table>';
544
- foreach ( $system_info['active_plugins'] as $key => $value ) {
545
- $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
 
 
 
546
  }
547
- $message_text .= '</table>
548
- <h4>Inactive Plugins</h4>
549
- <table>';
550
- foreach ( $system_info['inactive_plugins'] as $key => $value ) {
551
- $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
 
 
552
  }
553
- $message_text .= '</table></body></html>';
554
  $result = wp_mail( $email, 'System Info From ' . $home_url, $message_text, $headers );
555
  if ( $result != true )
556
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
@@ -898,12 +903,14 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
898
  <table class="bws_system_info">
899
  <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
900
  <tbody>
901
- <?php foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
902
- <tr>
903
- <td scope="row"><?php echo $key; ?></td>
904
- <td scope="row"><?php echo $value; ?></td>
905
- </tr>
906
- <?php } ?>
 
 
907
  </tbody>
908
  </table>
909
  <table class="bws_system_info">
1
  <?php
2
  /*
3
  * Function for displaying BestWebSoft menu
4
+ * Version: 1.3.7
5
  */
6
 
7
  if ( ! function_exists( 'bws_add_menu_render' ) ) {
515
  if ( ( isset( $_REQUEST['bwsmn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit' ) ) ||
516
  ( isset( $_REQUEST['bwsmn_form_submit_custom_email'] ) && check_admin_referer( plugin_basename(__FILE__), 'bwsmn_nonce_submit_custom_email' ) ) ) {
517
  if ( isset( $_REQUEST['bwsmn_form_email'] ) ) {
518
+ $bwsmn_form_email = esc_html( trim( $_REQUEST['bwsmn_form_email'] ) );
519
+ if ( $bwsmn_form_email == "" || ! is_email( $bwsmn_form_email ) ) {
520
  $error = __( "Please enter a valid email address.", 'bestwebsoft' );
521
  } else {
522
  $email = $bwsmn_form_email;
538
  foreach ( $system_info['system_info'] as $key => $value ) {
539
  $message_text .= '<tr><td>'. $key .'</td><td>'. $value .'</td></tr>';
540
  }
541
+ $message_text .= '</table>';
542
+ if ( ! empty( $system_info['active_plugins'] ) ) {
543
+ $message_text .= '<h4>Active Plugins</h4>
544
+ <table>';
545
+ foreach ( $system_info['active_plugins'] as $key => $value ) {
546
+ $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
547
+ }
548
+ $message_text .= '</table>';
549
  }
550
+ if ( ! empty( $system_info['inactive_plugins'] ) ) {
551
+ $message_text .= '<h4>Inactive Plugins</h4>
552
+ <table>';
553
+ foreach ( $system_info['inactive_plugins'] as $key => $value ) {
554
+ $message_text .= '<tr><td scope="row">'. $key .'</td><td scope="row">'. $value .'</td></tr>';
555
+ }
556
+ $message_text .= '</table>';
557
  }
558
+ $message_text .= '</body></html>';
559
  $result = wp_mail( $email, 'System Info From ' . $home_url, $message_text, $headers );
560
  if ( $result != true )
561
  $error = __( "Sorry, email message could not be delivered.", 'bestwebsoft' );
903
  <table class="bws_system_info">
904
  <thead><tr><th><?php _e( 'Active Plugins', 'bestwebsoft' ); ?></th><th></th></tr></thead>
905
  <tbody>
906
+ <?php if ( ! empty( $system_info['active_plugins'] ) ) {
907
+ foreach ( $system_info['active_plugins'] as $key => $value ) { ?>
908
+ <tr>
909
+ <td scope="row"><?php echo $key; ?></td>
910
+ <td scope="row"><?php echo $value; ?></td>
911
+ </tr>
912
+ <?php }
913
+ } ?>
914
  </tbody>
915
  </table>
916
  <table class="bws_system_info">
bws_menu/icons/bws-google-analytics.png CHANGED
File without changes
bws_menu/icons/bws-google-maps.png CHANGED
File without changes
bws_menu/icons/contact-form-multi.png CHANGED
File without changes
bws_menu/icons/db-manager.png CHANGED
File without changes
bws_menu/icons/subscriber.png CHANGED
File without changes
css/style.css CHANGED
File without changes
facebook-button-plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Facebook Button
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Put Facebook Button in to your post.
6
  Author: BestWebSoft
7
- Version: 2.33
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -123,10 +123,10 @@ if ( ! function_exists( 'fcbkbttn_settings' ) ) {
123
  'like' => 1,
124
  'share' => 0,
125
  'where' => '',
126
- 'display_option' => '',
127
  'count_icon' => 1,
128
  'extention' => 'png',
129
- 'fb_img_link' => plugins_url( "images/standart-facebook-ico.png", __FILE__ ),
130
  'locale' => 'en_US',
131
  'html5' => 0
132
  );
@@ -159,14 +159,14 @@ if ( ! function_exists( 'fcbkbttn_settings' ) ) {
159
  }
160
  }
161
  /* Get options from the database */
162
- if ( 1 == $wpmu )
163
- $fcbkbttn_options = get_site_option( 'fcbk_bttn_plgn_options' );
164
- else
165
- $fcbkbttn_options = get_option( 'fcbk_bttn_plgn_options' );
166
 
167
  if ( ! isset( $fcbkbttn_options['plugin_option_version'] ) || $fcbkbttn_options['plugin_option_version'] != $fcbkbttn_plugin_info["Version"] ) {
168
- if ( stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.jpg' ) )
169
- $fcbkbttn_options['fb_img_link'] = plugins_url( "images/standart-facebook-ico.png", __FILE__ );
 
 
 
170
 
171
  if ( stristr( $fcbkbttn_options['fb_img_link'], 'img/' ) )
172
  $fcbkbttn_options['fb_img_link'] = plugins_url( str_replace( 'img/', 'images/', $fcbkbttn_options['fb_img_link'] ), __FILE__ );
@@ -204,11 +204,11 @@ if ( ! function_exists( 'fcbkbttn_settings_page' ) ) {
204
  if ( isset( $_REQUEST['fcbkbttn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'fcbkbttn_nonce_name' ) ) {
205
  /* Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options'. */
206
  if ( isset( $_REQUEST['fcbkbttn_where'] ) && isset( $_REQUEST['fcbkbttn_link'] ) && isset( $_REQUEST['fcbkbttn_display_option'] ) ) {
207
- $fcbkbttn_options['link'] = $_REQUEST['fcbkbttn_link'];
208
  $fcbkbttn_options['where'] = $_REQUEST['fcbkbttn_where'];
209
  $fcbkbttn_options['display_option'] = $_REQUEST['fcbkbttn_display_option'];
210
- if ( 'standart' == $fcbkbttn_options['display_option'] ) {
211
- $fcbkbttn_options['fb_img_link'] = plugins_url( 'images/standart-facebook-ico.png', __FILE__ );
212
  }
213
  $fcbkbttn_options['my_page'] = isset( $_REQUEST['fcbkbttn_my_page'] ) ? 1 : 0 ;
214
  $fcbkbttn_options['like'] = isset( $_REQUEST['fcbkbttn_like'] ) ? 1 : 0 ;
@@ -280,7 +280,7 @@ if ( ! function_exists( 'fcbkbttn_settings_page' ) ) {
280
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
281
  global $wpmu;
282
 
283
- $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? trim( $_POST['bws_license_key'] ) : "";
284
  $bstwbsftwppdtplgns_options_defaults = array();
285
  if ( 1 == $wpmu ) {
286
  if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
@@ -297,7 +297,7 @@ if ( ! function_exists( 'fcbkbttn_settings_page' ) ) {
297
  if ( strlen( $bws_license_key ) != 18 ) {
298
  $error = __( "Wrong license key", 'facebook' );
299
  } else {
300
- $bws_license_plugin = trim( $_POST['bws_license_plugin'] );
301
  if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] < ( time() + (24 * 60 * 60) ) ) {
302
  $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
303
  } else {
@@ -438,7 +438,7 @@ if ( ! function_exists( 'fcbkbttn_settings_page' ) ) {
438
  <td>
439
  <?php if ( scandir( $upload_dir['basedir'] ) && is_writable( $upload_dir['basedir'] ) ) { ?>
440
  <select name="fcbkbttn_display_option" onchange="if ( this . value == 'custom' ) { getElementById ( 'fcbkbttn_display_option_custom' ) . style.display = 'table-row'; } else { getElementById ( 'fcbkbttn_display_option_custom' ) . style.display = 'none'; }">
441
- <option <?php if ( 'standart' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="standart"><?php _e( "Standard Facebook image", 'facebook' ); ?></option>
442
  <option <?php if ( 'custom' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="custom"><?php _e( "Custom Facebook image", 'facebook' ); ?></option>
443
  </select>
444
  <?php } else {
@@ -620,8 +620,8 @@ if ( ! function_exists( 'fcbkbttn_settings_page' ) ) {
620
  if ( ! function_exists( 'fcbkbttn_update_option' ) ) {
621
  function fcbkbttn_update_option() {
622
  global $fcbkbttn_options;
623
- if ( 'standart' == $fcbkbttn_options['display_option'] ) {
624
- $fb_img_link = plugins_url( 'images/standart-facebook-ico.png', __FILE__ );
625
  } else if ( 'custom' == $fcbkbttn_options['display_option'] ) {
626
  $upload_dir = wp_upload_dir();
627
  $fb_img_link = $upload_dir['baseurl'] . '/facebook-image/facebook-ico' . $fcbkbttn_options['count_icon'] . '.' . $fcbkbttn_options['extention'];
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Put Facebook Button in to your post.
6
  Author: BestWebSoft
7
+ Version: 2.34
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
123
  'like' => 1,
124
  'share' => 0,
125
  'where' => '',
126
+ 'display_option' => 'standard',
127
  'count_icon' => 1,
128
  'extention' => 'png',
129
+ 'fb_img_link' => plugins_url( "images/standard-facebook-ico.png", __FILE__ ),
130
  'locale' => 'en_US',
131
  'html5' => 0
132
  );
159
  }
160
  }
161
  /* Get options from the database */
162
+ $fcbkbttn_options = ( 1 == $wpmu ) ? get_site_option( 'fcbk_bttn_plgn_options' ) : get_option( 'fcbk_bttn_plgn_options' );
 
 
 
163
 
164
  if ( ! isset( $fcbkbttn_options['plugin_option_version'] ) || $fcbkbttn_options['plugin_option_version'] != $fcbkbttn_plugin_info["Version"] ) {
165
+ if ( stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.jpg' ) || stristr( $fcbkbttn_options['fb_img_link'], 'standart-facebook-ico.png' ) )
166
+ $fcbkbttn_options['fb_img_link'] = plugins_url( "images/standard-facebook-ico.png", __FILE__ );
167
+
168
+ if ( 'standart' == $fcbkbttn_options['display_option'] )
169
+ $fcbkbttn_options['display_option'] = 'standard';
170
 
171
  if ( stristr( $fcbkbttn_options['fb_img_link'], 'img/' ) )
172
  $fcbkbttn_options['fb_img_link'] = plugins_url( str_replace( 'img/', 'images/', $fcbkbttn_options['fb_img_link'] ), __FILE__ );
204
  if ( isset( $_REQUEST['fcbkbttn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'fcbkbttn_nonce_name' ) ) {
205
  /* Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options'. */
206
  if ( isset( $_REQUEST['fcbkbttn_where'] ) && isset( $_REQUEST['fcbkbttn_link'] ) && isset( $_REQUEST['fcbkbttn_display_option'] ) ) {
207
+ $fcbkbttn_options['link'] = stripslashes( esc_html( $_REQUEST['fcbkbttn_link'] ) );
208
  $fcbkbttn_options['where'] = $_REQUEST['fcbkbttn_where'];
209
  $fcbkbttn_options['display_option'] = $_REQUEST['fcbkbttn_display_option'];
210
+ if ( 'standard' == $fcbkbttn_options['display_option'] ) {
211
+ $fcbkbttn_options['fb_img_link'] = plugins_url( 'images/standard-facebook-ico.png', __FILE__ );
212
  }
213
  $fcbkbttn_options['my_page'] = isset( $_REQUEST['fcbkbttn_my_page'] ) ? 1 : 0 ;
214
  $fcbkbttn_options['like'] = isset( $_REQUEST['fcbkbttn_like'] ) ? 1 : 0 ;
280
  if ( isset( $_GET['action'] ) && 'go_pro' == $_GET['action'] ) {
281
  global $wpmu;
282
 
283
+ $bws_license_key = ( isset( $_POST['bws_license_key'] ) ) ? stripslashes( esc_html( trim( $_POST['bws_license_key'] ) ) ) : "";
284
  $bstwbsftwppdtplgns_options_defaults = array();
285
  if ( 1 == $wpmu ) {
286
  if ( !get_site_option( 'bstwbsftwppdtplgns_options' ) )
297
  if ( strlen( $bws_license_key ) != 18 ) {
298
  $error = __( "Wrong license key", 'facebook' );
299
  } else {
300
+ $bws_license_plugin = stripslashes( esc_html( $_POST['bws_license_plugin'] ) );
301
  if ( isset( $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] ) && $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['time'] < ( time() + (24 * 60 * 60) ) ) {
302
  $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] = $bstwbsftwppdtplgns_options['go_pro'][ $bws_license_plugin ]['count'] + 1;
303
  } else {
438
  <td>
439
  <?php if ( scandir( $upload_dir['basedir'] ) && is_writable( $upload_dir['basedir'] ) ) { ?>
440
  <select name="fcbkbttn_display_option" onchange="if ( this . value == 'custom' ) { getElementById ( 'fcbkbttn_display_option_custom' ) . style.display = 'table-row'; } else { getElementById ( 'fcbkbttn_display_option_custom' ) . style.display = 'none'; }">
441
+ <option <?php if ( 'standard' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="standard"><?php _e( "Standard Facebook image", 'facebook' ); ?></option>
442
  <option <?php if ( 'custom' == $fcbkbttn_options['display_option'] ) echo 'selected="selected"'; ?> value="custom"><?php _e( "Custom Facebook image", 'facebook' ); ?></option>
443
  </select>
444
  <?php } else {
620
  if ( ! function_exists( 'fcbkbttn_update_option' ) ) {
621
  function fcbkbttn_update_option() {
622
  global $fcbkbttn_options;
623
+ if ( 'standard' == $fcbkbttn_options['display_option'] ) {
624
+ $fb_img_link = plugins_url( 'images/standard-facebook-ico.png', __FILE__ );
625
  } else if ( 'custom' == $fcbkbttn_options['display_option'] ) {
626
  $upload_dir = wp_upload_dir();
627
  $fb_img_link = $upload_dir['baseurl'] . '/facebook-image/facebook-ico' . $fcbkbttn_options['count_icon'] . '.' . $fcbkbttn_options['extention'];
images/facebook-ico3.jpg DELETED
Binary file
images/{facebook-ico3.png → standard-facebook-ico.png} RENAMED
File without changes
images/standart-facebook-ico.png DELETED
Binary file
languages/facebook-fr_FR.mo CHANGED
File without changes
languages/facebook-fr_FR.po CHANGED
File without changes
languages/facebook-ru_RU.mo CHANGED
File without changes
languages/facebook-ru_RU.po CHANGED
File without changes
languages/facebook-uk.mo CHANGED
File without changes
languages/facebook-uk.po CHANGED
File without changes
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bestwebsoft
3
  Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=1&product_id=94
4
  Tags: button, buton, batton, button image, button position, Button like, Facebook, Facebook account button, facebook button, facebook button language, Facebook button icon, Facebook button like, Facebook button share, Facebook ID, Facebook page, facebook like, facebook like button, facebook share, facebook share button, follow, Follow button, icon, Like, like button, My Page button, Share, share button, social, social button, social account
5
  Requires at least: 3.0
6
- Tested up to: 4.0-beta2
7
- Stable tag: 2.33
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = V2.33 - 06.08.2014 =
111
  * Update : We updated all functionality for wordpress 4.0-beta2.
112
  * Bugfix : Problem with custom images after updating plugin was fixed.
@@ -245,6 +248,9 @@ Please make sure that the problem hasn't been discussed yet on our forum (<a hre
245
 
246
  == Upgrade Notice ==
247
 
 
 
 
248
  = V2.33 =
249
  We updated all functionality for wordpress 4.0-beta2. Problem with custom images after updating plugin was fixed.
250
 
3
  Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=1&product_id=94
4
  Tags: button, buton, batton, button image, button position, Button like, Facebook, Facebook account button, facebook button, facebook button language, Facebook button icon, Facebook button like, Facebook button share, Facebook ID, Facebook page, facebook like, facebook like button, facebook share, facebook share button, follow, Follow button, icon, Like, like button, My Page button, Share, share button, social, social button, social account
5
  Requires at least: 3.0
6
+ Tested up to: 4.0
7
+ Stable tag: 2.34
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = V2.34 - 13.08.2014 =
111
+ * Budfix : Security Exploit was fixed.
112
+
113
  = V2.33 - 06.08.2014 =
114
  * Update : We updated all functionality for wordpress 4.0-beta2.
115
  * Bugfix : Problem with custom images after updating plugin was fixed.
248
 
249
  == Upgrade Notice ==
250
 
251
+ = V2.34 =
252
+ Security Exploit was fixed.
253
+
254
  = V2.33 =
255
  We updated all functionality for wordpress 4.0-beta2. Problem with custom images after updating plugin was fixed.
256