Facebook Button by BestWebSoft - Version 2011.2.05

Version Description

Download this release

Release Info

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

Code changes from version 2011.2.01 to 2011.2.05

Thumbs.db DELETED
Binary file
facebook-button-plugin.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Facebook Button Plugin
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Put Facebook Button in to your post.
6
  Author: BestWebSoft
7
- Version: 2.01
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -28,16 +28,74 @@ License: GPLv2 or later
28
  if( ! function_exists( 'bws_add_menu_render' ) ) {
29
  function bws_add_menu_render() {
30
  global $title;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  ?>
32
  <div class="wrap">
33
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
34
  <h2><?php echo $title;?></h2>
35
- <p><a href="http://wordpress.org/extend/plugins/captcha/">Captcha</a></p>
36
- <p><a href="http://wordpress.org/extend/plugins/contact-form-plugin/">Contact Form</a></p>
37
- <p><a href="http://wordpress.org/extend/plugins/facebook-button-plugin/">Facebook Like Button Plugin</a></p>
38
- <p><a href="http://wordpress.org/extend/plugins/twitter-plugin/">Twitter Plugin</a></p>
39
- <p><a href="http://wordpress.org/extend/plugins/portfolio/">Portfolio</a></p>
40
- <span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  </div>
42
  <?php
43
  }
@@ -48,11 +106,11 @@ if( ! function_exists( 'bws_plugin_header' ) ) {
48
  global $post_type;
49
  ?>
50
  <style>
51
- #adminmenu #toplevel_page_my_new_menu div.wp-menu-image
52
  {
53
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16.png") no-repeat scroll center center transparent;
54
  }
55
- #adminmenu #toplevel_page_my_new_menu:hover div.wp-menu-image,#adminmenu #toplevel_page_my_new_menu.wp-has-current-submenu div.wp-menu-image
56
  {
57
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16_c.png") no-repeat scroll center center transparent;
58
  }
@@ -60,6 +118,10 @@ if( ! function_exists( 'bws_plugin_header' ) ) {
60
  {
61
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_36.png") no-repeat scroll left top transparent;
62
  }
 
 
 
 
63
  </style>
64
  <?php
65
  }
@@ -70,9 +132,8 @@ add_action('admin_head', 'bws_plugin_header');
70
 
71
  if( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
72
  function fcbk_bttn_plgn_add_pages() {
73
- //add_options_page ( 'FaceBook Button', 'FaceBook Button', 0, 'FaceBookButton', 'fcbk_bttn_plgn_settings_page' );
74
- add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'edit_themes', 'my_new_menu', 'bws_add_menu_render', " ", 90);
75
- add_submenu_page('my_new_menu', 'FaceBook Button Options', 'FaceBook Button', 'edit_themes', __FILE__, 'fcbk_bttn_plgn_settings_page');
76
 
77
  //call register settings function
78
  add_action( 'admin_init', 'fcbk_bttn_plgn_settings' );
@@ -185,10 +246,10 @@ if( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
185
  <div class="updated fade" <?php if( ! isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
186
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
187
  <div>
188
- <form name="form1" method="post" action="admin.php?page=facebook-button-plugin/facebook-button-plugin.php" enctype="multipart/form-data" >
189
  <table class="form-table">
190
  <tr valign="top">
191
- <th scope="row"><?php _e( "Your's FaceBook Login:" ); ?></th>
192
  <td>
193
  <input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] ?>' style="width:200px;" />
194
  </td>
@@ -339,7 +400,7 @@ function fcbk_bttn_plgn_action_links( $links, $file ) {
339
  if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
340
 
341
  if ( $file == $this_plugin ){
342
- $settings_link = '<a href="admin.php?page=facebook-button-plugin/facebook-button-plugin.php">' . __('Settings', 'facebook-button-plugin') . '</a>';
343
  array_unshift( $links, $settings_link );
344
  }
345
  return $links;
@@ -348,7 +409,7 @@ function fcbk_bttn_plgn_action_links( $links, $file ) {
348
  function fcbk_bttn_plgn_links($links, $file) {
349
  $base = plugin_basename(__FILE__);
350
  if ($file == $base) {
351
- $links[] = '<a href="admin.php?page=facebook-button-plugin/facebook-button-plugin.php">' . __('Settings','facebook-button-plugin') . '</a>';
352
  $links[] = '<a href="http://wordpress.org/extend/plugins/facebook-button-plugin/faq/" target="_blank">' . __('FAQ','facebook-button-plugin') . '</a>';
353
  $links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __('Support','facebook-button-plugin') . '</a>';
354
  }
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Put Facebook Button in to your post.
6
  Author: BestWebSoft
7
+ Version: 2.05
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
28
  if( ! function_exists( 'bws_add_menu_render' ) ) {
29
  function bws_add_menu_render() {
30
  global $title;
31
+ $active_plugins = get_option('active_plugins');
32
+ $all_plugins = get_plugins();
33
+
34
+ $array_activate = array();
35
+ $array_install = array();
36
+ $array_recomend = array();
37
+ $count_activate = $count_install = $count_recomend = 0;
38
+ $array_plugins = array(
39
+ array( 'captcha\/captcha.php', 'Captcha', 'http://wordpress.org/extend/plugins/captcha/', 'http://bestwebsoft.com/plugin/captcha-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=captcha&_wpnonce=e66502ec9a' ),
40
+ array( 'contact-form-plugin\/contact_form.php', 'Contact Form', 'http://wordpress.org/extend/plugins/contact-form-plugin/', 'http://bestwebsoft.com/plugin/contact-form/', '/wp-admin/update.php?action=install-plugin&plugin=contact-form-plugin&_wpnonce=47757d936f' ),
41
+ array( 'facebook-button-plugin\/facebook-button-plugin.php', 'Facebook Like Button Plugin', 'http://wordpress.org/extend/plugins/facebook-button-plugin/', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=facebook-button-plugin&_wpnonce=6eb654de19' ),
42
+ array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=twitter-plugin&_wpnonce=1612c998a5' ),
43
+ array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=portfolio&_wpnonce=488af7391d' )
44
+ );
45
+ foreach($array_plugins as $plugins)
46
+ {
47
+ if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) )
48
+ {
49
+ $array_activate[$count_activate]['title'] = $plugins[1];
50
+ $array_activate[$count_activate]['link'] = $plugins[2];
51
+ $array_activate[$count_activate]['href'] = $plugins[3];
52
+ $count_activate++;
53
+ }
54
+ else if( array_key_exists(str_replace("\\", "", $plugins[0]), $all_plugins) )
55
+ {
56
+ $array_install[$count_install]['title'] = $plugins[1];
57
+ $array_install[$count_install]['link'] = $plugins[2];
58
+ $array_install[$count_install]['href'] = $plugins[3];
59
+ $count_install++;
60
+ }
61
+ else
62
+ {
63
+ $array_recomend[$count_recomend]['title'] = $plugins[1];
64
+ $array_recomend[$count_recomend]['link'] = $plugins[2];
65
+ $array_recomend[$count_recomend]['href'] = $plugins[3];
66
+ $array_recomend[$count_recomend]['slug'] = $plugins[4];
67
+ $count_recomend++;
68
+ }
69
+ }
70
  ?>
71
  <div class="wrap">
72
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
73
  <h2><?php echo $title;?></h2>
74
+ <?php if($count_activate > 0) { ?>
75
+ <div>
76
+ <h3>Activated plugins</h3>
77
+ <?php foreach($array_activate as $activate_plugin) { ?>
78
+ <div style="float:left; width:200px;"><?php echo $activate_plugin['title']; ?></div> <p><a href="<?php echo $activate_plugin['link']; ?>">Read more</a></p>
79
+ <?php } ?>
80
+ </div>
81
+ <?php } ?>
82
+ <?php if($count_install > 0) { ?>
83
+ <div>
84
+ <h3>Installed plugins</h3>
85
+ <?php foreach($array_install as $install_plugin) { ?>
86
+ <div style="float:left; width:200px;"><?php echo $install_plugin['title']; ?></div> <p><a href="<?php echo $install_plugin['link']; ?>">Read more</a></p>
87
+ <?php } ?>
88
+ </div>
89
+ <?php } ?>
90
+ <?php if($count_recomend > 0) { ?>
91
+ <div>
92
+ <h3>Recommended plugins</h3>
93
+ <?php foreach($array_recomend as $recomend_plugin) { ?>
94
+ <div style="float:left; width:200px;"><?php echo $recomend_plugin['title']; ?></div> <p><a href="<?php echo $recomend_plugin['link']; ?>">Read more</a> <a href="<?php echo $recomend_plugin['href']; ?>">Download</a> <a class="install-now" href="<?php echo get_bloginfo("url") . $recomend_plugin['slug']; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin['title'] ) ) ?>"><?php echo __( 'Install Now' ) ?></a></p>
95
+ <?php } ?>
96
+ <span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
97
+ </div>
98
+ <?php } ?>
99
  </div>
100
  <?php
101
  }
106
  global $post_type;
107
  ?>
108
  <style>
109
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image
110
  {
111
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16.png") no-repeat scroll center center transparent;
112
  }
113
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,#adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image
114
  {
115
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16_c.png") no-repeat scroll center center transparent;
116
  }
118
  {
119
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_36.png") no-repeat scroll left top transparent;
120
  }
121
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item
122
+ {
123
+ display:none;
124
+ }
125
  </style>
126
  <?php
127
  }
132
 
133
  if( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
134
  function fcbk_bttn_plgn_add_pages() {
135
+ add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'manage_options', 'bws_plugins', 'bws_add_menu_render', WP_CONTENT_URL."/plugins/facebook-button-plugin/img/px.png", 101);
136
+ add_submenu_page('bws_plugins', 'FaceBook Button Options', 'FaceBook Button', 'manage_options', "facebook-button-plugin.php", 'fcbk_bttn_plgn_settings_page');
 
137
 
138
  //call register settings function
139
  add_action( 'admin_init', 'fcbk_bttn_plgn_settings' );
246
  <div class="updated fade" <?php if( ! isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
247
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
248
  <div>
249
+ <form name="form1" method="post" action="admin.php?page=facebook-button-plugin.php" enctype="multipart/form-data" >
250
  <table class="form-table">
251
  <tr valign="top">
252
+ <th scope="row"><?php _e( "Your's FaceBook Id:" ); ?></th>
253
  <td>
254
  <input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] ?>' style="width:200px;" />
255
  </td>
400
  if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
401
 
402
  if ( $file == $this_plugin ){
403
+ $settings_link = '<a href="admin.php?page=facebook-button-plugin.php">' . __('Settings', 'facebook-button-plugin') . '</a>';
404
  array_unshift( $links, $settings_link );
405
  }
406
  return $links;
409
  function fcbk_bttn_plgn_links($links, $file) {
410
  $base = plugin_basename(__FILE__);
411
  if ($file == $base) {
412
+ $links[] = '<a href="admin.php?page=facebook-button-plugin.php">' . __('Settings','facebook-button-plugin') . '</a>';
413
  $links[] = '<a href="http://wordpress.org/extend/plugins/facebook-button-plugin/faq/" target="_blank">' . __('FAQ','facebook-button-plugin') . '</a>';
414
  $links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __('Support','facebook-button-plugin') . '</a>';
415
  }
img/px.png ADDED
Binary file
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: bestwebsoft
3
  Contributors: bestwebsoft
4
  Donate link: http://bestwebsoft.com/
5
  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
6
- Requires at least: 3.1
7
- Tested up to: 3.1
8
- Stable tag: 2011.2.01
9
 
10
  Add Facebook button to your WordPress website
11
 
@@ -58,16 +58,40 @@ Facebook Button Plugin allows you to add follow button in the most easiest and f
58
 
59
  == Changelog ==
60
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  = 2.01 =
62
  *Usability at the settings page of plugin was improved.
63
 
64
  = 1 =
65
- *Ability to install Facebook Button icon wth link to the account page, including settings adjustment functionality via WordPress admin panel.
66
 
67
  == Upgrade Notice ==
68
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  = 2.01 =
70
  Usability at the settings page of plugin was improved.
71
 
72
  = 1 =
73
- Ability to install Facebook Button icon wth link to the account page, including settings adjustment functionality via WordPress admin panel.
3
  Contributors: bestwebsoft
4
  Donate link: http://bestwebsoft.com/
5
  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
6
+ Requires at least: 2.9
7
+ Tested up to: 3.2
8
+ Stable tag: 2011.2.05
9
 
10
  Add Facebook button to your WordPress website
11
 
58
 
59
  == Changelog ==
60
 
61
+ = 2.05 =
62
+ *The bug of redirect to profile page is fixed.
63
+
64
+ = 2.04 =
65
+ *BWS Plugins sections was fixed and right now it is consisted with 3 parts: activated, installed and recommended plugins. The bug of position in the admin menu is fixed. Facebook button plugin functionality was changed in connection with the change of Facebook API.
66
+
67
+ = 2.03 =
68
+ *BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
69
+
70
+ = 2.02 =
71
+ *The bug of the setting page link is fixed in this version. Please upgrade the plugin immediately. Thank you
72
+
73
  = 2.01 =
74
  *Usability at the settings page of plugin was improved.
75
 
76
  = 1 =
77
+ *Ability to install Facebook Button icon with link to the account page, including settings adjustment functionality via WordPress admin panel.
78
 
79
  == Upgrade Notice ==
80
 
81
+ = 2.05 =
82
+ The bug of redirect to profile page is fixed.
83
+
84
+ = 2.04 =
85
+ BWS Plugins sections was fixed and right now it is consisted with 3 parts: activated, installed and recommended plugins. The bug of position in the admin menu is fixed. Facebook button plugin functionality was changed in connection with the change of Facebook API.
86
+
87
+ = 2.03 =
88
+ BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
89
+
90
+ = 2.02 =
91
+ The bug of the setting page link is fixed in this version. Please upgrade the plugin immediately. Thank you
92
+
93
  = 2.01 =
94
  Usability at the settings page of plugin was improved.
95
 
96
  = 1 =
97
+ Ability to install Facebook Button icon with link to the account page, including settings adjustment functionality via WordPress admin panel.
screenshot-1.jpg CHANGED
Binary file
screenshot-2.jpg CHANGED
Binary file
screenshot-3.jpg CHANGED
Binary file