Facebook Button by BestWebSoft - Version 2.25

Version Description

  • 06.11.2013 =
  • Bugfix : Problem with styles is fixed.
Download this release

Release Info

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

Code changes from version 2.24 to 2.25

bws_menu/bws_menu.php CHANGED
@@ -32,7 +32,8 @@ if ( ! function_exists( 'bws_add_menu_render' ) ) {
32
  array( 'custom-fields-search\/custom-fields-search.php', 'Custom Fields Search', 'http://bestwebsoft.com/plugin/custom-fields-search/', 'http://bestwebsoft.com/plugin/custom-fields-search/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Fields+Search+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_fields_search.php' ),
33
  array( 'google-one\/google-plus-one.php', 'Google +1', 'http://bestwebsoft.com/plugin/google-plus-one/', 'http://bestwebsoft.com/plugin/google-plus-one/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+%2B1+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-plus-one.php' ),
34
  array( 'relevant\/related-posts-plugin.php', 'Related Posts Plugin', 'http://bestwebsoft.com/plugin/related-posts-plugin/', 'http://bestwebsoft.com/plugin/related-posts-plugin/#download', '/wp-admin/plugin-install.php?tab=search&s=Related+Posts+Plugin+Bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=related-posts-plugin.php' ),
35
- array( 'contact-form-to-db\/contact_form_to_db.php', 'Contact Form to DB', 'http://bestwebsoft.com/plugin/contact-form-to-db/', 'http://bestwebsoft.com/plugin/contact-form-to-db/#download', '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+to+DB+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=cntctfrmtdb_settings' )
 
36
  );
37
  foreach ( $array_plugins as $plugins ) {
38
  if ( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) || is_plugin_active_for_network( str_replace( '\\', '', $plugins[0] ) ) ) {
32
  array( 'custom-fields-search\/custom-fields-search.php', 'Custom Fields Search', 'http://bestwebsoft.com/plugin/custom-fields-search/', 'http://bestwebsoft.com/plugin/custom-fields-search/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Fields+Search+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_fields_search.php' ),
33
  array( 'google-one\/google-plus-one.php', 'Google +1', 'http://bestwebsoft.com/plugin/google-plus-one/', 'http://bestwebsoft.com/plugin/google-plus-one/#download', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+%2B1+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-plus-one.php' ),
34
  array( 'relevant\/related-posts-plugin.php', 'Related Posts Plugin', 'http://bestwebsoft.com/plugin/related-posts-plugin/', 'http://bestwebsoft.com/plugin/related-posts-plugin/#download', '/wp-admin/plugin-install.php?tab=search&s=Related+Posts+Plugin+Bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=related-posts-plugin.php' ),
35
+ array( 'contact-form-to-db\/contact_form_to_db.php', 'Contact Form to DB', 'http://bestwebsoft.com/plugin/contact-form-to-db/', 'http://bestwebsoft.com/plugin/contact-form-to-db/#download', '/wp-admin/plugin-install.php?tab=search&s=Contact+Form+to+DB+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=cntctfrmtdb_settings' ),
36
+ array( 'pdf-print\/pdf-print.php', 'PDF & Print', 'http://bestwebsoft.com/plugin/pdf-print/', 'http://bestwebsoft.com/plugin/pdf-print/#download', '/wp-admin/plugin-install.php?tab=search&s=PDF+Print+Bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=pdf-print.php' )
37
  );
38
  foreach ( $array_plugins as $plugins ) {
39
  if ( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) || is_plugin_active_for_network( str_replace( '\\', '', $plugins[0] ) ) ) {
css/style.css CHANGED
@@ -38,17 +38,20 @@
38
 
39
  #fcbk_share {
40
  clear: both;
 
41
  }
42
  .fcbk_button {
43
  float: left;
44
- padding: 2px 10px 2px 0;
45
  }
46
  .fcbk_button a {
 
47
  display: block;
48
- line-height: 0;
49
  }
50
  .fcbk_like {
51
  float: left;
 
 
52
  }
53
  .fb_edge_widget_with_comment span {
54
  width: 450px !important;
38
 
39
  #fcbk_share {
40
  clear: both;
41
+ height: 40px;
42
  }
43
  .fcbk_button {
44
  float: left;
45
+ margin-right: 10px;
46
  }
47
  .fcbk_button a {
48
+ height: 40px;
49
  display: block;
 
50
  }
51
  .fcbk_like {
52
  float: left;
53
+ position: relative;
54
+ top: -3px;
55
  }
56
  .fb_edge_widget_with_comment span {
57
  width: 450px !important;
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.24
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -39,40 +39,59 @@ if ( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
39
 
40
  if ( ! function_exists( 'fcbk_bttn_plgn_settings' ) ) {
41
  function fcbk_bttn_plgn_settings() {
42
- global $wpmu, $fcbk_bttn_plgn_options_array;
43
- $fcbk_bttn_plgn_options_array_default = array(
44
- 'fcbk_bttn_plgn_link' => '',
45
- 'fcbk_bttn_plgn_my_page' => 1,
46
- 'fcbk_bttn_plgn_like' => 1,
47
- 'fcbk_bttn_plgn_where' => '',
48
- 'fcbk_bttn_plgn_display_option' => '',
49
- 'fcbk_bttn_plgn_count_icon' => 1,
50
- 'fb_img_link' => plugins_url( "img/standart-facebook-ico.jpg", __FILE__ ),
51
- 'fcbk_bttn_plgn_locale' => 'en_US'
52
  );
53
  /* Install the option defaults */
54
  if ( 1 == $wpmu ) {
55
- if ( ! get_site_option( 'fcbk_bttn_plgn_options_array' ) ) {
56
- add_site_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array_default, '', 'yes' );
 
 
 
 
 
 
 
 
 
57
  }
58
  } else {
59
- if( ! get_option( 'fcbk_bttn_plgn_options_array' ) )
60
- add_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array_default, '', 'yes' );
 
 
 
 
 
 
 
 
 
 
61
  }
62
  /* Get options from the database */
63
  if ( 1 == $wpmu )
64
- $fcbk_bttn_plgn_options_array = get_site_option( 'fcbk_bttn_plgn_options_array' );
65
  else
66
- $fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
67
- $fcbk_bttn_plgn_options_array = array_merge( $fcbk_bttn_plgn_options_array_default, $fcbk_bttn_plgn_options_array );
68
- update_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
69
  }
70
  }
71
 
72
  /* Function formed content of the plugin's admin page. */
73
  if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
74
  function fcbk_bttn_plgn_settings_page() {
75
- global $fcbk_bttn_plgn_options_array;
76
  $copy = false;
77
 
78
  if ( false !== @copy( plugin_dir_path( __FILE__ ) . "img/facebook-ico.jpg", plugin_dir_path( __FILE__ ) . "img/facebook-ico3.jpg" ) )
@@ -81,21 +100,21 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
81
  $message = "";
82
  $error = "";
83
  if ( isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'fcbk_bttn_plgn_nonce_name' ) ) {
84
- /* Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options_array'. */
85
  if ( isset( $_REQUEST['fcbk_bttn_plgn_where'] ) && isset( $_REQUEST['fcbk_bttn_plgn_link'] ) && isset( $_REQUEST['fcbk_bttn_plgn_display_option'] ) ) {
86
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_link'] = $_REQUEST['fcbk_bttn_plgn_link'];
87
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] = $_REQUEST['fcbk_bttn_plgn_where'];
88
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] = $_REQUEST['fcbk_bttn_plgn_display_option'];
89
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_my_page'] = isset( $_REQUEST['fcbk_bttn_plgn_my_page'] ) ? 1 : 0 ;
90
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_like'] = isset( $_REQUEST['fcbk_bttn_plgn_like'] ) ? 1 : 0 ;
91
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] = $_REQUEST['fcbk_bttn_plgn_locale'];
92
  if ( isset( $_FILES['uploadfile']['tmp_name'] ) && $_FILES['uploadfile']['tmp_name'] != "" ) {
93
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'] = $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'] + 1;
94
  }
95
 
96
- if ( 2 < $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'] )
97
- $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'] = 1;
98
- update_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
99
  $message = __( "Settings saved", 'facebook' );
100
  }
101
  /* Form options */
@@ -105,7 +124,7 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
105
  $max_image_size = 32 * 1024;
106
  $valid_types = array( 'jpg', 'jpeg' );
107
  /* Construction to rename downloading file */
108
- $new_name = 'facebook-ico' . $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'];
109
  $new_ext = '.jpg';
110
  $namefile = $new_name . $new_ext;
111
  $uploaddir = $_REQUEST['home'] . 'wp-content/plugins/facebook-button-plugin/img/'; /* The directory in which we will take the file: */
@@ -153,14 +172,14 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
153
  <tr valign="top">
154
  <th scope="row"><?php _e( "Your Facebook ID:", 'facebook' ); ?></th>
155
  <td>
156
- <input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_link']; ?>' style="width:200px;" />
157
  </td>
158
  </tr>
159
  <tr valign="top">
160
  <th scope="row"><?php _e( "Display button:", 'facebook' ); ?></th>
161
  <td>
162
- <label><input name='fcbk_bttn_plgn_my_page' type='checkbox' value='1' <?php if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_my_page'] ) echo 'checked="checked "'; ?>/> <?php echo __( "My Page", 'captcha' ); ?></label><br />
163
- <label><input name='fcbk_bttn_plgn_like' type='checkbox' value='1' <?php if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_like'] ) echo 'checked="checked "'; ?>/> <?php echo __( "Like", 'captcha' ); ?></label><br />
164
  </td>
165
  </tr>
166
  <tr>
@@ -169,9 +188,9 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
169
  </th>
170
  <td>
171
  <select name="fcbk_bttn_plgn_display_option" onchange="if ( this . value == 'custom' ) { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'block'; } else { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'none'; }" style="width:200px;" >
172
- <option <?php if ( 'standart' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) echo 'selected="selected"'; ?> value="standart"><?php echo __( "Standard Facebook image", 'facebook' ); ?></option>
173
- <?php if ( $copy || 'custom' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) { ?>
174
- <option <?php if ( 'custom' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) echo 'selected="selected"'; ?> value="custom"><?php echo __( "Custom Facebook image", 'facebook' ); ?></option>
175
  <?php } ?>
176
  </select>
177
  </td>
@@ -181,12 +200,12 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
181
  <?php echo __( "Current image:", 'facebook' ); ?>
182
  </th>
183
  <td>
184
- <img src="<?php echo $fcbk_bttn_plgn_options_array['fb_img_link']; ?>" style="margin-left:2px;" />
185
  </td>
186
  </tr>
187
  <tr>
188
  <td colspan="2">
189
- <div id="fcbk_bttn_plgn_display_option_custom" <?php if ( 'custom' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) { echo ( 'style="display:block"' ); } else { echo ( 'style="display:none"' ); } ?>>
190
  <table>
191
  <th style="padding-left:0px; font-size:13px;">
192
  <input type="hidden" name="MAX_FILE_SIZE" value="64000"/>
@@ -207,12 +226,12 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
207
  </th>
208
  <td>
209
  <select name="fcbk_bttn_plgn_where" onchange="if ( this . value == 'shortcode' ) { getElementById ( 'shortcode' ) . style.display = 'inline'; } else { getElementById ( 'shortcode' ) . style.display = 'none'; }" style="width:200px;" >
210
- <option <?php if ( 'before' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] ) echo 'selected="selected"'; ?> value="before"><?php echo __( "Before", 'facebook' ); ?></option>
211
- <option <?php if ( 'after' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] ) echo 'selected="selected"'; ?> value="after"><?php echo __( "After", 'facebook' ); ?></option>
212
- <option <?php if ( 'beforeandafter' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] ) echo 'selected="selected"'; ?> value="beforeandafter"><?php echo __( "Before and After", 'facebook' ); ?></option>
213
- <option <?php if ( 'shortcode' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] ) echo 'selected="selected"'; ?> value="shortcode"><?php echo __( "Shortcode", 'facebook' ); ?></option>
214
  </select>
215
- <span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; <?php if ( $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'] == 'shortcode' ) { echo ( 'display:inline' ); } else { echo ( 'display:none' ); }?>"><?php echo __( "If you would like to add a Facebook button to your website, just copy and paste this shortcode into your post or page:", 'facebook' ); ?> [fb_button].</span>
216
  </td>
217
  </tr>
218
  <tr>
@@ -221,112 +240,112 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
221
  </th>
222
  <td>
223
  <select name="fcbk_bttn_plgn_locale">
224
- <option value="af_ZA" <?php if ( "af_ZA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Afrikaans</option>
225
- <option value="ar_AR" <?php if ( "ar_AR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>العربية</option>
226
- <option value="ay_BO" <?php if ( "ay_BO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Aymar aru</option>
227
- <option value="az_AZ" <?php if ( "az_AZ" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Azərbaycan dili</option>
228
- <option value="be_BY" <?php if ( "be_BY" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Беларуская</option>
229
- <option value="bg_BG" <?php if ( "bg_BG" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Български</option>
230
- <option value="bn_IN" <?php if ( "bn_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>বাংলা</option>
231
- <option value="bs_BA" <?php if ( "bs_BA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Bosanski</option>
232
- <option value="ca_ES" <?php if ( "ca_ES" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Català</option>
233
- <option value="ck_US" <?php if ( "ck_US" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Cherokee</option>
234
- <option value="cs_CZ" <?php if ( "cs_CZ" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Čeština</option>
235
- <option value="cy_GB" <?php if ( "cy_GB" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Cymraeg</option>
236
- <option value="da_DK" <?php if ( "da_DK" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Dansk</option>
237
- <option value="de_DE" <?php if ( "de_DE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Deutsch</option>
238
- <option value="el_GR" <?php if ( "el_GR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Ελληνικά</option>
239
- <option value="en_US" <?php if ( "en_US" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>English</option>
240
- <option value="en_PI" <?php if ( "en_PI" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>English (Pirate)</option>
241
- <option value="eo_EO" <?php if ( "eo_EO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Esperanto</option>
242
- <option value="es_CL" <?php if ( "es_CL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español (Chile)</option>
243
- <option value="es_CO" <?php if ( "es_CO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español (Colombia)</option>
244
- <option value="es_ES" <?php if ( "es_ES" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español (España)</option>
245
- <option value="es_LA" <?php if ( "es_LA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español</option>
246
- <option value="es_MX" <?php if ( "es_MX" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español (México)</option>
247
- <option value="es_VE" <?php if ( "es_VE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Español (Venezuela)</option>
248
- <option value="et_EE" <?php if ( "et_EE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Eesti</option>
249
- <option value="eu_ES" <?php if ( "eu_ES" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Euskara</option>
250
- <option value="fa_IR" <?php if ( "fa_IR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>فارسی</option>
251
- <option value="fb_LT" <?php if ( "fb_LT" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Leet Speak</option>
252
- <option value="fi_FI" <?php if ( "fi_FI" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Suomi</option>
253
- <option value="fo_FO" <?php if ( "fo_FO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Føroyskt</option>
254
- <option value="fr_CA" <?php if ( "fr_CA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Français (Canada)</option>
255
- <option value="fr_FR" <?php if ( "fr_FR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Français (France)</option>
256
- <option value="fy_NL" <?php if ( "fy_NL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Frysk</option>
257
- <option value="ga_IE" <?php if ( "ga_IE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Gaeilge</option>
258
- <option value="gl_ES" <?php if ( "gl_ES" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Galego</option>
259
- <option value="gn_PY" <?php if ( "gn_PY" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Avañe'ẽ</option>
260
- <option value="gu_IN" <?php if ( "gu_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ગુજરાતી</option>
261
- <option value="gx_GR" <?php if ( "gx_GR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Ἑλληνική ἀρχαία</option>
262
- <option value="he_IL" <?php if ( "he_IL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>עברית</option>
263
- <option value="hi_IN" <?php if ( "hi_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>हिन्दी</option>
264
- <option value="hr_HR" <?php if ( "hr_HR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Hrvatski</option>
265
- <option value="hu_HU" <?php if ( "hu_HU" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Magyar</option>
266
- <option value="hy_AM" <?php if ( "hy_AM" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Հայերեն</option>
267
- <option value="id_ID" <?php if ( "id_ID" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Bahasa Indonesia</option>
268
- <option value="is_IS" <?php if ( "is_IS" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Íslenska</option>
269
- <option value="it_IT" <?php if ( "it_IT" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Italiano</option>
270
- <option value="ja_JP" <?php if ( "ja_JP" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>日本語</option>
271
- <option value="jv_ID" <?php if ( "jv_ID" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Basa Jawa</option>
272
- <option value="ka_GE" <?php if ( "ka_GE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ქართული</option>
273
- <option value="kk_KZ" <?php if ( "kk_KZ" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Қазақша</option>
274
- <option value="km_KH" <?php if ( "km_KH" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ភាសាខ្មែរ</option>
275
- <option value="kn_IN" <?php if ( "kn_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ಕನ್ನಡ</option>
276
- <option value="ko_KR" <?php if ( "ko_KR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>한국어</option>
277
- <option value="ku_TR" <?php if ( "ku_TR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Kurdî</option>
278
- <option value="la_VA" <?php if ( "la_VA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>lingua latina</option>
279
- <option value="li_NL" <?php if ( "li_NL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Limburgs</option>
280
- <option value="lt_LT" <?php if ( "lt_LT" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Lietuvių</option>
281
- <option value="lv_LV" <?php if ( "lv_LV" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Latviešu</option>
282
- <option value="mg_MG" <?php if ( "mg_MG" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Malagasy</option>
283
- <option value="mk_MK" <?php if ( "mk_MK" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Македонски</option>
284
- <option value="ml_IN" <?php if ( "ml_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>മലയാളം</option>
285
- <option value="mn_MN" <?php if ( "mn_MN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Монгол</option>
286
- <option value="mr_IN" <?php if ( "mr_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>मराठी</option>
287
- <option value="ms_MY" <?php if ( "ms_MY" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Bahasa Melayu</option>
288
- <option value="mt_MT" <?php if ( "mt_MT" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Malti</option>
289
- <option value="nb_NO" <?php if ( "nb_NO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Norsk (bokmål)</option>
290
- <option value="ne_NP" <?php if ( "ne_NP" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>नेपाली</option>
291
- <option value="nl_BE" <?php if ( "nl_BE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Nederlands (België)</option>
292
- <option value="nl_NL" <?php if ( "nl_NL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Nederlands</option>
293
- <option value="nn_NO" <?php if ( "nn_NO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Norsk (nynorsk)</option>
294
- <option value="pa_IN" <?php if ( "pa_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ਪੰਜਾਬੀ</option>
295
- <option value="pl_PL" <?php if ( "pl_PL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Polski</option>
296
- <option value="ps_AF" <?php if ( "ps_AF" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>پښتو</option>
297
- <option value="pt_BR" <?php if ( "pt_BR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Português (Brasil)</option>
298
- <option value="pt_PT" <?php if ( "pt_PT" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Português (Portugal)</option>
299
- <option value="qu_PE" <?php if ( "qu_PE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Qhichwa</option>
300
- <option value="rm_CH" <?php if ( "rm_CH" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Rumantsch</option>
301
- <option value="ro_RO" <?php if ( "ro_RO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Română</option>
302
- <option value="ru_RU" <?php if ( "ru_RU" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Русский</option>
303
- <option value="sa_IN" <?php if ( "sa_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>संस्कृतम्</option>
304
- <option value="se_NO" <?php if ( "se_NO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Davvisámegiella</option>
305
- <option value="sk_SK" <?php if ( "sk_SK" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Slovenčina</option>
306
- <option value="sl_SI" <?php if ( "sl_SI" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Slovenščina</option>
307
- <option value="so_SO" <?php if ( "so_SO" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Soomaaliga</option>
308
- <option value="sq_AL" <?php if ( "sq_AL" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Shqip</option>
309
- <option value="sr_RS" <?php if ( "sr_RS" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Српски</option>
310
- <option value="sv_SE" <?php if ( "sv_SE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Svenska</option>
311
- <option value="sw_KE" <?php if ( "sw_KE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Kiswahili</option>
312
- <option value="sy_SY" <?php if ( "sy_SY" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ܐܪܡܝܐ</option>
313
- <option value="ta_IN" <?php if ( "ta_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>தமிழ்</option>
314
- <option value="te_IN" <?php if ( "te_IN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>తెలుగు</option>
315
- <option value="tg_TJ" <?php if ( "tg_TJ" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>тоҷикӣ</option>
316
- <option value="th_TH" <?php if ( "th_TH" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ภาษาไทย</option>
317
- <option value="tl_PH" <?php if ( "tl_PH" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Filipino</option>
318
- <option value="tl_ST" <?php if ( "tl_ST" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>tlhIngan-Hol</option>
319
- <option value="tr_TR" <?php if ( "tr_TR" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Türkçe</option>
320
- <option value="tt_RU" <?php if ( "tt_RU" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Татарча</option>
321
- <option value="uk_UA" <?php if ( "uk_UA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Українська</option>
322
- <option value="ur_PK" <?php if ( "ur_PK" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>اردو</option>
323
- <option value="uz_UZ" <?php if ( "uz_UZ" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>O'zbek</option>
324
- <option value="vi_VN" <?php if ( "vi_VN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>Tiếng Việt</option>
325
- <option value="yi_DE" <?php if ( "yi_DE" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>ייִדיש</option>
326
- <option value="zh_CN" <?php if ( "zh_CN" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>中文(简体)</option>
327
- <option value="zh_HK" <?php if ( "zh_HK" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>中文(香港)</option>
328
- <option value="zh_TW" <?php if ( "zh_TW" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>中文(台灣)</option>
329
- <option value="zu_ZA" <?php if ( "zu_ZA" == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] ) echo 'selected="selected"'; ?>>isiZulu</option>
330
  </select>
331
  <span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; display:inline"><?php echo __( "Change the language of Facebook Like Button", 'facebook' ); ?></span>
332
  </td>
@@ -345,43 +364,43 @@ if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
345
  <?php }
346
  }
347
 
348
- /* Function 'facebook_fcbk_bttn_plgn_display_option' reacts to changes type of picture (Standard or Custom) and generates link to image, link transferred to array 'fcbk_bttn_plgn_options_array' */
349
  if ( ! function_exists( 'fcbk_bttn_plgn_update_option' ) ) {
350
  function fcbk_bttn_plgn_update_option() {
351
- global $fcbk_bttn_plgn_options_array;
352
- if ( 'standart' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) {
353
  $fb_img_link = plugins_url( 'img/standart-facebook-ico.jpg', __FILE__ );
354
- } else if ( 'custom' == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_display_option'] ) {
355
- $fb_img_link = plugins_url( 'img/facebook-ico' . $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_count_icon'] . '.jpg', __FILE__ );
356
  }
357
- $fcbk_bttn_plgn_options_array['fb_img_link'] = $fb_img_link ;
358
- update_option( "fcbk_bttn_plgn_options_array", $fcbk_bttn_plgn_options_array );
359
  }
360
  }
361
 
362
- /* Function 'facebook_button' taking from array 'fcbk_bttn_plgn_options_array' necessary information to create Facebook Button and reacting to your choise in plugin menu - points where it appears. */
363
  if ( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
364
  function fcbk_bttn_plgn_display_button( $content ) {
365
  global $post;
366
- /* Query the database to receive array 'fcbk_bttn_plgn_options_array' and receiving necessary information to create button */
367
- $fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
368
- $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'];
369
- $permalink_post = get_permalink( $post->ID );
370
  /* Button */
371
- $button = '<div id="fcbk_share">';
372
- $img = $fcbk_bttn_plgn_options_array['fb_img_link'];
373
- $url = $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_link'];
374
- if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_my_page'] ) {
375
  $button .= '<div class="fcbk_button">
376
  <a href="http://www.facebook.com/' . $url . '" target="_blank">
377
  <img src="' . $img . '" alt="Fb-Button" />
378
  </a>
379
  </div>';
380
  }
381
- if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_like'] ) {
382
  $button .= '<div class="fcbk_like">
383
  <div id="fb-root"></div>
384
- <script src="http://connect.facebook.net/' . $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_locale'] . '/all.js#appId=224313110927811&amp;xfbml=1"></script>
385
  <fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
386
  </div>';
387
  }
@@ -406,20 +425,20 @@ if ( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
406
  if ( ! function_exists( 'fcbk_bttn_plgn_shortcode' ) ) {
407
  function fcbk_bttn_plgn_shortcode( $content ) {
408
  global $post;
409
- $fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
410
- $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_where'];
411
- $permalink_post = get_permalink( $post->ID );
412
- $button = '<div id="fcbk_share">';
413
- $img = $fcbk_bttn_plgn_options_array['fb_img_link'];
414
- $url = $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_link'];
415
- if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_my_page'] ) {
416
  $button .= '<div class="fcbk_button">
417
  <a href="http://www.facebook.com/' . $url . '" target="_blank">
418
  <img src="' . $img . '" alt="Fb-Button" />
419
  </a>
420
  </div>';
421
  }
422
- if ( 1 == $fcbk_bttn_plgn_options_array['fcbk_bttn_plgn_like'] ) {
423
  $button .= '<div class="fcbk_like">
424
  <div id="fb-root"></div>
425
  <script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
@@ -452,9 +471,9 @@ if ( ! function_exists ( 'fcbk_bttn_plgn_links' ) ) {
452
  function fcbk_bttn_plgn_links( $links, $file ) {
453
  $base = plugin_basename( __FILE__ );
454
  if ( $file == $base ) {
455
- $links[] = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings', 'facebook' ) . '</a>';
456
- $links[] = '<a href="http://wordpress.org/plugins/facebook-button-plugin/faq/" target="_blank">' . __( 'FAQ', 'facebook' ) . '</a>';
457
- $links[] = '<a href="http://support.bestwebsoft.com">' . __( 'Support', 'facebook' ) . '</a>';
458
  }
459
  return $links;
460
  }
@@ -496,8 +515,8 @@ if ( ! function_exists( 'fcbk_admin_head' ) ) {
496
  /* Function for delete options */
497
  if ( ! function_exists( 'fcbk_delete_options' ) ) {
498
  function fcbk_delete_options() {
499
- delete_option( 'fcbk_bttn_plgn_options_array' );
500
- delete_site_option( 'fcbk_bttn_plgn_options_array' );
501
  }
502
  }
503
 
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Put Facebook Button in to your post.
6
  Author: BestWebSoft
7
+ Version: 2.25
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
39
 
40
  if ( ! function_exists( 'fcbk_bttn_plgn_settings' ) ) {
41
  function fcbk_bttn_plgn_settings() {
42
+ global $wpmu, $fcbk_bttn_plgn_options;
43
+ $fcbk_bttn_plgn_options_default = array(
44
+ 'link' => '',
45
+ 'my_page' => 1,
46
+ 'like' => 1,
47
+ 'where' => '',
48
+ 'display_option' => '',
49
+ 'count_icon' => 1,
50
+ 'fb_img_link' => plugins_url( "img/standart-facebook-ico.jpg", __FILE__ ),
51
+ 'locale' => 'en_US'
52
  );
53
  /* Install the option defaults */
54
  if ( 1 == $wpmu ) {
55
+ if ( ! get_site_option( 'fcbk_bttn_plgn_options' ) ) {
56
+ if ( false !== get_site_option( 'fcbk_bttn_plgn_options_array' ) ) {
57
+ $old_options = get_site_option( 'fcbk_bttn_plgn_options_array' );
58
+ foreach ( $fcbk_bttn_plgn_options_default as $key => $value ) {
59
+ if ( isset( $old_options['fcbk_bttn_plgn_' . $key] ) )
60
+ $fcbk_bttn_plgn_options_default[$key] = $old_options['fcbk_bttn_plgn_' . $key];
61
+ }
62
+ update_site_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options_default );
63
+ delete_site_option( 'fcbk_bttn_plgn_options_array' );
64
+ }
65
+ add_site_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options_default, '', 'yes' );
66
  }
67
  } else {
68
+ if ( ! get_option( 'fcbk_bttn_plgn_options' ) ) {
69
+ if ( false !== get_option( 'fcbk_bttn_plgn_options_array' ) ) {
70
+ $old_options = get_option( 'fcbk_bttn_plgn_options_array' );
71
+ foreach ( $fcbk_bttn_plgn_options_default as $key => $value ) {
72
+ if ( isset( $old_options['fcbk_bttn_plgn_' . $key] ) )
73
+ $fcbk_bttn_plgn_options_default[$key] = $old_options['fcbk_bttn_plgn_' . $key];
74
+ }
75
+ update_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options_default );
76
+ delete_option( 'fcbk_bttn_plgn_options_array' );
77
+ }
78
+ add_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options_default, '', 'yes' );
79
+ }
80
  }
81
  /* Get options from the database */
82
  if ( 1 == $wpmu )
83
+ $fcbk_bttn_plgn_options = get_site_option( 'fcbk_bttn_plgn_options' );
84
  else
85
+ $fcbk_bttn_plgn_options = get_option( 'fcbk_bttn_plgn_options' );
86
+ $fcbk_bttn_plgn_options = array_merge( $fcbk_bttn_plgn_options_default, $fcbk_bttn_plgn_options );
87
+ update_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options );
88
  }
89
  }
90
 
91
  /* Function formed content of the plugin's admin page. */
92
  if ( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
93
  function fcbk_bttn_plgn_settings_page() {
94
+ global $fcbk_bttn_plgn_options;
95
  $copy = false;
96
 
97
  if ( false !== @copy( plugin_dir_path( __FILE__ ) . "img/facebook-ico.jpg", plugin_dir_path( __FILE__ ) . "img/facebook-ico3.jpg" ) )
100
  $message = "";
101
  $error = "";
102
  if ( isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) && check_admin_referer( plugin_basename( __FILE__ ), 'fcbk_bttn_plgn_nonce_name' ) ) {
103
+ /* Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options'. */
104
  if ( isset( $_REQUEST['fcbk_bttn_plgn_where'] ) && isset( $_REQUEST['fcbk_bttn_plgn_link'] ) && isset( $_REQUEST['fcbk_bttn_plgn_display_option'] ) ) {
105
+ $fcbk_bttn_plgn_options['link'] = $_REQUEST['fcbk_bttn_plgn_link'];
106
+ $fcbk_bttn_plgn_options['where'] = $_REQUEST['fcbk_bttn_plgn_where'];
107
+ $fcbk_bttn_plgn_options['display_option'] = $_REQUEST['fcbk_bttn_plgn_display_option'];
108
+ $fcbk_bttn_plgn_options['my_page'] = isset( $_REQUEST['fcbk_bttn_plgn_my_page'] ) ? 1 : 0 ;
109
+ $fcbk_bttn_plgn_options['like'] = isset( $_REQUEST['fcbk_bttn_plgn_like'] ) ? 1 : 0 ;
110
+ $fcbk_bttn_plgn_options['locale'] = $_REQUEST['fcbk_bttn_plgn_locale'];
111
  if ( isset( $_FILES['uploadfile']['tmp_name'] ) && $_FILES['uploadfile']['tmp_name'] != "" ) {
112
+ $fcbk_bttn_plgn_options['count_icon'] = $fcbk_bttn_plgn_options['count_icon'] + 1;
113
  }
114
 
115
+ if ( 2 < $fcbk_bttn_plgn_options['count_icon'] )
116
+ $fcbk_bttn_plgn_options['count_icon'] = 1;
117
+ update_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options );
118
  $message = __( "Settings saved", 'facebook' );
119
  }
120
  /* Form options */
124
  $max_image_size = 32 * 1024;
125
  $valid_types = array( 'jpg', 'jpeg' );
126
  /* Construction to rename downloading file */
127
+ $new_name = 'facebook-ico' . $fcbk_bttn_plgn_options['count_icon'];
128
  $new_ext = '.jpg';
129
  $namefile = $new_name . $new_ext;
130
  $uploaddir = $_REQUEST['home'] . 'wp-content/plugins/facebook-button-plugin/img/'; /* The directory in which we will take the file: */
172
  <tr valign="top">
173
  <th scope="row"><?php _e( "Your Facebook ID:", 'facebook' ); ?></th>
174
  <td>
175
+ <input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options['link']; ?>' style="width:200px;" />
176
  </td>
177
  </tr>
178
  <tr valign="top">
179
  <th scope="row"><?php _e( "Display button:", 'facebook' ); ?></th>
180
  <td>
181
+ <label><input name='fcbk_bttn_plgn_my_page' type='checkbox' value='1' <?php if ( 1 == $fcbk_bttn_plgn_options['my_page'] ) echo 'checked="checked "'; ?>/> <?php echo __( "My Page", 'captcha' ); ?></label><br />
182
+ <label><input name='fcbk_bttn_plgn_like' type='checkbox' value='1' <?php if ( 1 == $fcbk_bttn_plgn_options['like'] ) echo 'checked="checked "'; ?>/> <?php echo __( "Like", 'captcha' ); ?></label><br />
183
  </td>
184
  </tr>
185
  <tr>
188
  </th>
189
  <td>
190
  <select name="fcbk_bttn_plgn_display_option" onchange="if ( this . value == 'custom' ) { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'block'; } else { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'none'; }" style="width:200px;" >
191
+ <option <?php if ( 'standart' == $fcbk_bttn_plgn_options['display_option'] ) echo 'selected="selected"'; ?> value="standart"><?php echo __( "Standard Facebook image", 'facebook' ); ?></option>
192
+ <?php if ( $copy || 'custom' == $fcbk_bttn_plgn_options['display_option'] ) { ?>
193
+ <option <?php if ( 'custom' == $fcbk_bttn_plgn_options['display_option'] ) echo 'selected="selected"'; ?> value="custom"><?php echo __( "Custom Facebook image", 'facebook' ); ?></option>
194
  <?php } ?>
195
  </select>
196
  </td>
200
  <?php echo __( "Current image:", 'facebook' ); ?>
201
  </th>
202
  <td>
203
+ <img src="<?php echo $fcbk_bttn_plgn_options['fb_img_link']; ?>" style="margin-left:2px;" />
204
  </td>
205
  </tr>
206
  <tr>
207
  <td colspan="2">
208
+ <div id="fcbk_bttn_plgn_display_option_custom" <?php if ( 'custom' == $fcbk_bttn_plgn_options['display_option'] ) { echo ( 'style="display:block"' ); } else { echo ( 'style="display:none"' ); } ?>>
209
  <table>
210
  <th style="padding-left:0px; font-size:13px;">
211
  <input type="hidden" name="MAX_FILE_SIZE" value="64000"/>
226
  </th>
227
  <td>
228
  <select name="fcbk_bttn_plgn_where" onchange="if ( this . value == 'shortcode' ) { getElementById ( 'shortcode' ) . style.display = 'inline'; } else { getElementById ( 'shortcode' ) . style.display = 'none'; }" style="width:200px;" >
229
+ <option <?php if ( 'before' == $fcbk_bttn_plgn_options['where'] ) echo 'selected="selected"'; ?> value="before"><?php echo __( "Before", 'facebook' ); ?></option>
230
+ <option <?php if ( 'after' == $fcbk_bttn_plgn_options['where'] ) echo 'selected="selected"'; ?> value="after"><?php echo __( "After", 'facebook' ); ?></option>
231
+ <option <?php if ( 'beforeandafter' == $fcbk_bttn_plgn_options['where'] ) echo 'selected="selected"'; ?> value="beforeandafter"><?php echo __( "Before and After", 'facebook' ); ?></option>
232
+ <option <?php if ( 'shortcode' == $fcbk_bttn_plgn_options['where'] ) echo 'selected="selected"'; ?> value="shortcode"><?php echo __( "Shortcode", 'facebook' ); ?></option>
233
  </select>
234
+ <span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; <?php if ( $fcbk_bttn_plgn_options['where'] == 'shortcode' ) { echo ( 'display:inline' ); } else { echo ( 'display:none' ); }?>"><?php echo __( "If you would like to add a Facebook button to your website, just copy and paste this shortcode into your post or page:", 'facebook' ); ?> [fb_button].</span>
235
  </td>
236
  </tr>
237
  <tr>
240
  </th>
241
  <td>
242
  <select name="fcbk_bttn_plgn_locale">
243
+ <option value="af_ZA" <?php if ( "af_ZA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Afrikaans</option>
244
+ <option value="ar_AR" <?php if ( "ar_AR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>العربية</option>
245
+ <option value="ay_BO" <?php if ( "ay_BO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Aymar aru</option>
246
+ <option value="az_AZ" <?php if ( "az_AZ" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Azərbaycan dili</option>
247
+ <option value="be_BY" <?php if ( "be_BY" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Беларуская</option>
248
+ <option value="bg_BG" <?php if ( "bg_BG" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Български</option>
249
+ <option value="bn_IN" <?php if ( "bn_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>বাংলা</option>
250
+ <option value="bs_BA" <?php if ( "bs_BA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Bosanski</option>
251
+ <option value="ca_ES" <?php if ( "ca_ES" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Català</option>
252
+ <option value="ck_US" <?php if ( "ck_US" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Cherokee</option>
253
+ <option value="cs_CZ" <?php if ( "cs_CZ" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Čeština</option>
254
+ <option value="cy_GB" <?php if ( "cy_GB" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Cymraeg</option>
255
+ <option value="da_DK" <?php if ( "da_DK" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Dansk</option>
256
+ <option value="de_DE" <?php if ( "de_DE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Deutsch</option>
257
+ <option value="el_GR" <?php if ( "el_GR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Ελληνικά</option>
258
+ <option value="en_US" <?php if ( "en_US" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>English</option>
259
+ <option value="en_PI" <?php if ( "en_PI" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>English (Pirate)</option>
260
+ <option value="eo_EO" <?php if ( "eo_EO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Esperanto</option>
261
+ <option value="es_CL" <?php if ( "es_CL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español (Chile)</option>
262
+ <option value="es_CO" <?php if ( "es_CO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español (Colombia)</option>
263
+ <option value="es_ES" <?php if ( "es_ES" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español (España)</option>
264
+ <option value="es_LA" <?php if ( "es_LA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español</option>
265
+ <option value="es_MX" <?php if ( "es_MX" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español (México)</option>
266
+ <option value="es_VE" <?php if ( "es_VE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Español (Venezuela)</option>
267
+ <option value="et_EE" <?php if ( "et_EE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Eesti</option>
268
+ <option value="eu_ES" <?php if ( "eu_ES" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Euskara</option>
269
+ <option value="fa_IR" <?php if ( "fa_IR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>فارسی</option>
270
+ <option value="fb_LT" <?php if ( "fb_LT" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Leet Speak</option>
271
+ <option value="fi_FI" <?php if ( "fi_FI" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Suomi</option>
272
+ <option value="fo_FO" <?php if ( "fo_FO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Føroyskt</option>
273
+ <option value="fr_CA" <?php if ( "fr_CA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Français (Canada)</option>
274
+ <option value="fr_FR" <?php if ( "fr_FR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Français (France)</option>
275
+ <option value="fy_NL" <?php if ( "fy_NL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Frysk</option>
276
+ <option value="ga_IE" <?php if ( "ga_IE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Gaeilge</option>
277
+ <option value="gl_ES" <?php if ( "gl_ES" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Galego</option>
278
+ <option value="gn_PY" <?php if ( "gn_PY" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Avañe'ẽ</option>
279
+ <option value="gu_IN" <?php if ( "gu_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ગુજરાતી</option>
280
+ <option value="gx_GR" <?php if ( "gx_GR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Ἑλληνική ἀρχαία</option>
281
+ <option value="he_IL" <?php if ( "he_IL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>עברית</option>
282
+ <option value="hi_IN" <?php if ( "hi_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>हिन्दी</option>
283
+ <option value="hr_HR" <?php if ( "hr_HR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Hrvatski</option>
284
+ <option value="hu_HU" <?php if ( "hu_HU" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Magyar</option>
285
+ <option value="hy_AM" <?php if ( "hy_AM" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Հայերեն</option>
286
+ <option value="id_ID" <?php if ( "id_ID" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Bahasa Indonesia</option>
287
+ <option value="is_IS" <?php if ( "is_IS" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Íslenska</option>
288
+ <option value="it_IT" <?php if ( "it_IT" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Italiano</option>
289
+ <option value="ja_JP" <?php if ( "ja_JP" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>日本語</option>
290
+ <option value="jv_ID" <?php if ( "jv_ID" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Basa Jawa</option>
291
+ <option value="ka_GE" <?php if ( "ka_GE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ქართული</option>
292
+ <option value="kk_KZ" <?php if ( "kk_KZ" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Қазақша</option>
293
+ <option value="km_KH" <?php if ( "km_KH" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ភាសាខ្មែរ</option>
294
+ <option value="kn_IN" <?php if ( "kn_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ಕನ್ನಡ</option>
295
+ <option value="ko_KR" <?php if ( "ko_KR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>한국어</option>
296
+ <option value="ku_TR" <?php if ( "ku_TR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Kurdî</option>
297
+ <option value="la_VA" <?php if ( "la_VA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>lingua latina</option>
298
+ <option value="li_NL" <?php if ( "li_NL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Limburgs</option>
299
+ <option value="lt_LT" <?php if ( "lt_LT" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Lietuvių</option>
300
+ <option value="lv_LV" <?php if ( "lv_LV" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Latviešu</option>
301
+ <option value="mg_MG" <?php if ( "mg_MG" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Malagasy</option>
302
+ <option value="mk_MK" <?php if ( "mk_MK" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Македонски</option>
303
+ <option value="ml_IN" <?php if ( "ml_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>മലയാളം</option>
304
+ <option value="mn_MN" <?php if ( "mn_MN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Монгол</option>
305
+ <option value="mr_IN" <?php if ( "mr_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>मराठी</option>
306
+ <option value="ms_MY" <?php if ( "ms_MY" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Bahasa Melayu</option>
307
+ <option value="mt_MT" <?php if ( "mt_MT" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Malti</option>
308
+ <option value="nb_NO" <?php if ( "nb_NO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Norsk (bokmål)</option>
309
+ <option value="ne_NP" <?php if ( "ne_NP" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>नेपाली</option>
310
+ <option value="nl_BE" <?php if ( "nl_BE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Nederlands (België)</option>
311
+ <option value="nl_NL" <?php if ( "nl_NL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Nederlands</option>
312
+ <option value="nn_NO" <?php if ( "nn_NO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Norsk (nynorsk)</option>
313
+ <option value="pa_IN" <?php if ( "pa_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ਪੰਜਾਬੀ</option>
314
+ <option value="pl_PL" <?php if ( "pl_PL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Polski</option>
315
+ <option value="ps_AF" <?php if ( "ps_AF" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>پښتو</option>
316
+ <option value="pt_BR" <?php if ( "pt_BR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Português (Brasil)</option>
317
+ <option value="pt_PT" <?php if ( "pt_PT" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Português (Portugal)</option>
318
+ <option value="qu_PE" <?php if ( "qu_PE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Qhichwa</option>
319
+ <option value="rm_CH" <?php if ( "rm_CH" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Rumantsch</option>
320
+ <option value="ro_RO" <?php if ( "ro_RO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Română</option>
321
+ <option value="ru_RU" <?php if ( "ru_RU" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Русский</option>
322
+ <option value="sa_IN" <?php if ( "sa_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>संस्कृतम्</option>
323
+ <option value="se_NO" <?php if ( "se_NO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Davvisámegiella</option>
324
+ <option value="sk_SK" <?php if ( "sk_SK" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Slovenčina</option>
325
+ <option value="sl_SI" <?php if ( "sl_SI" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Slovenščina</option>
326
+ <option value="so_SO" <?php if ( "so_SO" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Soomaaliga</option>
327
+ <option value="sq_AL" <?php if ( "sq_AL" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Shqip</option>
328
+ <option value="sr_RS" <?php if ( "sr_RS" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Српски</option>
329
+ <option value="sv_SE" <?php if ( "sv_SE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Svenska</option>
330
+ <option value="sw_KE" <?php if ( "sw_KE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Kiswahili</option>
331
+ <option value="sy_SY" <?php if ( "sy_SY" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ܐܪܡܝܐ</option>
332
+ <option value="ta_IN" <?php if ( "ta_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>தமிழ்</option>
333
+ <option value="te_IN" <?php if ( "te_IN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>తెలుగు</option>
334
+ <option value="tg_TJ" <?php if ( "tg_TJ" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>тоҷикӣ</option>
335
+ <option value="th_TH" <?php if ( "th_TH" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ภาษาไทย</option>
336
+ <option value="tl_PH" <?php if ( "tl_PH" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Filipino</option>
337
+ <option value="tl_ST" <?php if ( "tl_ST" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>tlhIngan-Hol</option>
338
+ <option value="tr_TR" <?php if ( "tr_TR" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Türkçe</option>
339
+ <option value="tt_RU" <?php if ( "tt_RU" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Татарча</option>
340
+ <option value="uk_UA" <?php if ( "uk_UA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Українська</option>
341
+ <option value="ur_PK" <?php if ( "ur_PK" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>اردو</option>
342
+ <option value="uz_UZ" <?php if ( "uz_UZ" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>O'zbek</option>
343
+ <option value="vi_VN" <?php if ( "vi_VN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>Tiếng Việt</option>
344
+ <option value="yi_DE" <?php if ( "yi_DE" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>ייִדיש</option>
345
+ <option value="zh_CN" <?php if ( "zh_CN" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>中文(简体)</option>
346
+ <option value="zh_HK" <?php if ( "zh_HK" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>中文(香港)</option>
347
+ <option value="zh_TW" <?php if ( "zh_TW" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>中文(台灣)</option>
348
+ <option value="zu_ZA" <?php if ( "zu_ZA" == $fcbk_bttn_plgn_options['locale'] ) echo 'selected="selected"'; ?>>isiZulu</option>
349
  </select>
350
  <span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; display:inline"><?php echo __( "Change the language of Facebook Like Button", 'facebook' ); ?></span>
351
  </td>
364
  <?php }
365
  }
366
 
367
+ /* Function 'facebook_fcbk_bttn_plgn_display_option' reacts to changes type of picture (Standard or Custom) and generates link to image, link transferred to array 'fcbk_bttn_plgn_options' */
368
  if ( ! function_exists( 'fcbk_bttn_plgn_update_option' ) ) {
369
  function fcbk_bttn_plgn_update_option() {
370
+ global $fcbk_bttn_plgn_options;
371
+ if ( 'standart' == $fcbk_bttn_plgn_options['display_option'] ) {
372
  $fb_img_link = plugins_url( 'img/standart-facebook-ico.jpg', __FILE__ );
373
+ } else if ( 'custom' == $fcbk_bttn_plgn_options['display_option'] ) {
374
+ $fb_img_link = plugins_url( 'img/facebook-ico' . $fcbk_bttn_plgn_options['count_icon'] . '.jpg', __FILE__ );
375
  }
376
+ $fcbk_bttn_plgn_options['fb_img_link'] = $fb_img_link ;
377
+ update_option( 'fcbk_bttn_plgn_options', $fcbk_bttn_plgn_options );
378
  }
379
  }
380
 
381
+ /* Function 'facebook_button' taking from array 'fcbk_bttn_plgn_options' necessary information to create Facebook Button and reacting to your choise in plugin menu - points where it appears. */
382
  if ( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
383
  function fcbk_bttn_plgn_display_button( $content ) {
384
  global $post;
385
+ /* Query the database to receive array 'fcbk_bttn_plgn_options' and receiving necessary information to create button */
386
+ $fcbk_bttn_plgn_options = get_option( 'fcbk_bttn_plgn_options' );
387
+ $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options['where'];
388
+ $permalink_post = get_permalink( $post->ID );
389
  /* Button */
390
+ $button = '<div id="fcbk_share">';
391
+ $img = $fcbk_bttn_plgn_options['fb_img_link'];
392
+ $url = $fcbk_bttn_plgn_options['link'];
393
+ if ( 1 == $fcbk_bttn_plgn_options['my_page'] ) {
394
  $button .= '<div class="fcbk_button">
395
  <a href="http://www.facebook.com/' . $url . '" target="_blank">
396
  <img src="' . $img . '" alt="Fb-Button" />
397
  </a>
398
  </div>';
399
  }
400
+ if ( 1 == $fcbk_bttn_plgn_options['like'] ) {
401
  $button .= '<div class="fcbk_like">
402
  <div id="fb-root"></div>
403
+ <script src="http://connect.facebook.net/' . $fcbk_bttn_plgn_options['locale'] . '/all.js#appId=224313110927811&amp;xfbml=1"></script>
404
  <fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
405
  </div>';
406
  }
425
  if ( ! function_exists( 'fcbk_bttn_plgn_shortcode' ) ) {
426
  function fcbk_bttn_plgn_shortcode( $content ) {
427
  global $post;
428
+ $fcbk_bttn_plgn_options = get_option( 'fcbk_bttn_plgn_options' );
429
+ $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options['where'];
430
+ $permalink_post = get_permalink( $post->ID );
431
+ $button = '<div id="fcbk_share">';
432
+ $img = $fcbk_bttn_plgn_options['fb_img_link'];
433
+ $url = $fcbk_bttn_plgn_options['link'];
434
+ if ( 1 == $fcbk_bttn_plgn_options['my_page'] ) {
435
  $button .= '<div class="fcbk_button">
436
  <a href="http://www.facebook.com/' . $url . '" target="_blank">
437
  <img src="' . $img . '" alt="Fb-Button" />
438
  </a>
439
  </div>';
440
  }
441
+ if ( 1 == $fcbk_bttn_plgn_options['like'] ) {
442
  $button .= '<div class="fcbk_like">
443
  <div id="fb-root"></div>
444
  <script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
471
  function fcbk_bttn_plgn_links( $links, $file ) {
472
  $base = plugin_basename( __FILE__ );
473
  if ( $file == $base ) {
474
+ $links[] = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings', 'facebook' ) . '</a>';
475
+ $links[] = '<a href="http://wordpress.org/plugins/facebook-button-plugin/faq/" target="_blank">' . __( 'FAQ', 'facebook' ) . '</a>';
476
+ $links[] = '<a href="http://support.bestwebsoft.com">' . __( 'Support', 'facebook' ) . '</a>';
477
  }
478
  return $links;
479
  }
515
  /* Function for delete options */
516
  if ( ! function_exists( 'fcbk_delete_options' ) ) {
517
  function fcbk_delete_options() {
518
+ delete_option( 'fcbk_bttn_plgn_options' );
519
+ delete_site_option( 'fcbk_bttn_plgn_options' );
520
  }
521
  }
522
 
js/bws_menu.js CHANGED
File without changes
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.2checkout.com/checkout/purchase?sid=1430388&quantity=10
4
  Tags: Facebook, Facebook Button, Like, Like button, Share, Share button, Facebook like, Facebook like button, Facebook button like, Button like, Facebook share, Facebook share button, Facebook button share
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
- Stable tag: 2.24
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -97,6 +97,9 @@ In WordPress admin panel go to "Settings", find the Facebook Button Plugin setti
97
 
98
  == Changelog ==
99
 
 
 
 
100
  = V2.24 - 31.10.2013 =
101
  * NEW : Add checking installed wordpress version.
102
  * Update : Activation of radio button or checkbox by clicking on its label.
@@ -176,7 +179,6 @@ In WordPress admin panel go to "Settings", find the Facebook Button Plugin setti
176
  = V2.04 - 22.08.2011 =
177
  * Bugfix : BWS Plugin's menu section was fixed and right now it is consisted of 3 parts: activated, installed and recommended plugins.
178
  * Bugfix : The bug of positioning in admin menu is fixed.
179
-
180
  * Changed : Facebook button plugin functionality was changed in connection with the change of Facebook API.
181
 
182
  = V2.03 - 14.07.2011 =
@@ -194,6 +196,9 @@ In WordPress admin panel go to "Settings", find the Facebook Button Plugin setti
194
 
195
  == Upgrade Notice ==
196
 
 
 
 
197
  = V2.24 =
198
  Add checking installed wordpress version. Activation of radio button or checkbox by clicking on its label. We updated all functionality for wordpress 3.7.1. Problem with undefined variable post_ID for multisite fixed.
199
 
4
  Tags: Facebook, Facebook Button, Like, Like button, Share, Share button, Facebook like, Facebook like button, Facebook button like, Button like, Facebook share, Facebook share button, Facebook button share
5
  Requires at least: 3.0
6
  Tested up to: 3.7.1
7
+ Stable tag: 2.25
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
97
 
98
  == Changelog ==
99
 
100
+ = V2.25 - 06.11.2013 =
101
+ * Bugfix : Problem with styles is fixed.
102
+
103
  = V2.24 - 31.10.2013 =
104
  * NEW : Add checking installed wordpress version.
105
  * Update : Activation of radio button or checkbox by clicking on its label.
179
  = V2.04 - 22.08.2011 =
180
  * Bugfix : BWS Plugin's menu section was fixed and right now it is consisted of 3 parts: activated, installed and recommended plugins.
181
  * Bugfix : The bug of positioning in admin menu is fixed.
 
182
  * Changed : Facebook button plugin functionality was changed in connection with the change of Facebook API.
183
 
184
  = V2.03 - 14.07.2011 =
196
 
197
  == Upgrade Notice ==
198
 
199
+ = V2.25 =
200
+ Problem with styles is fixed.
201
+
202
  = V2.24 =
203
  Add checking installed wordpress version. Activation of radio button or checkbox by clicking on its label. We updated all functionality for wordpress 3.7.1. Problem with undefined variable post_ID for multisite fixed.
204