Version Description
- 04.03.2013 =
- NEW : Ukrainian language file was added to the plugin.
Download this release
Release Info
Developer | bestwebsoft |
Plugin | Facebook Button by BestWebSoft |
Version | 2.17 |
Comparing to | |
See all releases |
Code changes from version 2.16 to 2.17
- facebook-button-plugin.php +575 -575
- languages/facebook-uk.mo +0 -0
- languages/facebook-uk.po +181 -0
- readme.txt +9 -2
facebook-button-plugin.php
CHANGED
@@ -1,575 +1,575 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
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.
|
8 |
-
Author URI: http://bestwebsoft.com/
|
9 |
-
License: GPLv2 or later
|
10 |
-
*/
|
11 |
-
|
12 |
-
/* Copyright 2011 BestWebSoft ( plugin@bestwebsoft.com )
|
13 |
-
|
14 |
-
This program is free software; you can redistribute it and/or modify
|
15 |
-
it under the terms of the GNU General Public License, version 2, as
|
16 |
-
published by the Free Software Foundation.
|
17 |
-
|
18 |
-
This program is distributed in the hope that it will be useful,
|
19 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
-
GNU General Public License for more details.
|
22 |
-
|
23 |
-
You should have received a copy of the GNU General Public License
|
24 |
-
along with this program; if not, write to the Free Software
|
25 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
-
*/
|
27 |
-
|
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/plugin-install.php?tab=search&type=term&s=Captcha+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=captcha.php' ),
|
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/plugin-install.php?tab=search&type=term&s=Contact+Form+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=contact_form.php' ),
|
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/plugin-install.php?tab=search&type=term&s=Facebook+Like+Button+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=facebook-button-plugin.php' ),
|
42 |
-
array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Twitter+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=twitter.php' ),
|
43 |
-
array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Portfolio+bestwebsoft&plugin-search-input=Search+Plugins', '' ),
|
44 |
-
array( 'gallery-plugin\/gallery-plugin.php', 'Gallery', 'http://wordpress.org/extend/plugins/gallery-plugin/', 'http://bestwebsoft.com/plugin/gallery-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Gallery+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', '' ),
|
45 |
-
array( 'adsense-plugin\/adsense-plugin.php', 'Google AdSense Plugin', 'http://wordpress.org/extend/plugins/adsense-plugin/', 'http://bestwebsoft.com/plugin/google-adsense-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Adsense+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=adsense-plugin.php' ),
|
46 |
-
array( 'custom-search-plugin\/custom-search-plugin.php', 'Custom Search Plugin', 'http://wordpress.org/extend/plugins/custom-search-plugin/', 'http://bestwebsoft.com/plugin/custom-search-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Search+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_search.php' ),
|
47 |
-
array( 'quotes-and-tips\/quotes-and-tips.php', 'Quotes and Tips', 'http://wordpress.org/extend/plugins/quotes-and-tips/', 'http://bestwebsoft.com/plugin/quotes-and-tips/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Quotes+and+Tips+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=quotes-and-tips.php' ),
|
48 |
-
array( 'google-sitemap-plugin\/google-sitemap-plugin.php', 'Google sitemap plugin', 'http://wordpress.org/extend/plugins/google-sitemap-plugin/', 'http://bestwebsoft.com/plugin/google-sitemap-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+sitemap+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-sitemap-plugin.php' ),
|
49 |
-
array( 'updater\/updater.php', 'Updater', 'http://wordpress.org/extend/plugins/updater/', 'http://bestwebsoft.com/plugin/updater/', '/wp-admin/plugin-install.php?tab=search&s=updater+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=updater-options' )
|
50 |
-
);
|
51 |
-
foreach($array_plugins as $plugins) {
|
52 |
-
if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) ) {
|
53 |
-
$array_activate[$count_activate]['title'] = $plugins[1];
|
54 |
-
$array_activate[$count_activate]['link'] = $plugins[2];
|
55 |
-
$array_activate[$count_activate]['href'] = $plugins[3];
|
56 |
-
$array_activate[$count_activate]['url'] = $plugins[5];
|
57 |
-
$count_activate++;
|
58 |
-
}
|
59 |
-
else if( array_key_exists(str_replace("\\", "", $plugins[0]), $all_plugins) ) {
|
60 |
-
$array_install[$count_install]['title'] = $plugins[1];
|
61 |
-
$array_install[$count_install]['link'] = $plugins[2];
|
62 |
-
$array_install[$count_install]['href'] = $plugins[3];
|
63 |
-
$count_install++;
|
64 |
-
}
|
65 |
-
else {
|
66 |
-
$array_recomend[$count_recomend]['title'] = $plugins[1];
|
67 |
-
$array_recomend[$count_recomend]['link'] = $plugins[2];
|
68 |
-
$array_recomend[$count_recomend]['href'] = $plugins[3];
|
69 |
-
$array_recomend[$count_recomend]['slug'] = $plugins[4];
|
70 |
-
$count_recomend++;
|
71 |
-
}
|
72 |
-
}
|
73 |
-
?>
|
74 |
-
<div class="wrap">
|
75 |
-
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
76 |
-
<h2><?php echo $title;?></h2>
|
77 |
-
<?php if( 0 < $count_activate ) { ?>
|
78 |
-
<div>
|
79 |
-
<h3><?php _e( 'Activated plugins', 'facebook' ); ?></h3>
|
80 |
-
<?php foreach( $array_activate as $activate_plugin ) { ?>
|
81 |
-
<div style="float:left; width:200px;"><?php echo $activate_plugin['title']; ?></div> <p><a href="<?php echo $activate_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a> <a href="<?php echo $activate_plugin['url']; ?>"><?php echo __( "Settings", 'facebook'); ?></a></p>
|
82 |
-
<?php } ?>
|
83 |
-
</div>
|
84 |
-
<?php } ?>
|
85 |
-
<?php if( 0 < $count_install ) { ?>
|
86 |
-
<div>
|
87 |
-
<h3><?php _e( 'Installed plugins', 'facebook' ); ?></h3>
|
88 |
-
<?php foreach($array_install as $install_plugin) { ?>
|
89 |
-
<div style="float:left; width:200px;"><?php echo $install_plugin['title']; ?></div> <p><a href="<?php echo $install_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a></p>
|
90 |
-
<?php } ?>
|
91 |
-
</div>
|
92 |
-
<?php } ?>
|
93 |
-
<?php if( 0 < $count_recomend ) { ?>
|
94 |
-
<div>
|
95 |
-
<h3><?php _e( 'Recommended plugins', 'facebook' ); ?></h3>
|
96 |
-
<?php foreach( $array_recomend as $recomend_plugin ) { ?>
|
97 |
-
<div style="float:left; width:200px;"><?php echo $recomend_plugin['title']; ?></div> <p><a href="<?php echo $recomend_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a> <a href="<?php echo $recomend_plugin['href']; ?>" target="_blank"><?php echo __( "Download", 'facebook'); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_plugin['slug']; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin['title'] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'facebook' ) ?></a></p>
|
98 |
-
<?php } ?>
|
99 |
-
<span style="color: rgb(136, 136, 136); font-size: 10px;"><?php _e( 'If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site', 'facebook' ); ?> <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
|
100 |
-
</div>
|
101 |
-
<?php } ?>
|
102 |
-
</div>
|
103 |
-
<?php
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
if( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
|
108 |
-
function fcbk_bttn_plgn_add_pages() {
|
109 |
-
add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "img/px.png", __FILE__ ), 1001);
|
110 |
-
add_submenu_page( 'bws_plugins', __( 'FaceBook Button Options', 'facebook' ), __( 'FaceBook Button', 'facebook' ), 'manage_options', "facebook-button-plugin.php", 'fcbk_bttn_plgn_settings_page');
|
111 |
-
|
112 |
-
//call register settings function
|
113 |
-
add_action( 'admin_init', 'fcbk_bttn_plgn_settings' );
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
if( ! function_exists( 'fcbk_bttn_plgn_settings' ) ) {
|
118 |
-
function fcbk_bttn_plgn_settings() {
|
119 |
-
global $fcbk_bttn_plgn_options_array;
|
120 |
-
|
121 |
-
$fcbk_bttn_plgn_options_array_default = array(
|
122 |
-
'fcbk_bttn_plgn_link' => '',
|
123 |
-
'fcbk_bttn_plgn_my_page' => 1,
|
124 |
-
'fcbk_bttn_plgn_like' => 1,
|
125 |
-
'fcbk_bttn_plgn_where' => '',
|
126 |
-
'fcbk_bttn_plgn_display_option' => '',
|
127 |
-
'fcbk_bttn_plgn_count_icon' => 1,
|
128 |
-
'fb_img_link' => plugins_url( "img/standart-facebook-ico.jpg", __FILE__ ),
|
129 |
-
'fcbk_bttn_plgn_locale' => 'en_US'
|
130 |
-
);
|
131 |
-
|
132 |
-
if( ! get_option( 'fcbk_bttn_plgn_options_array' ) )
|
133 |
-
add_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array_default, '', 'yes' );
|
134 |
-
|
135 |
-
$fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
|
136 |
-
|
137 |
-
$fcbk_bttn_plgn_options_array = array_merge( $fcbk_bttn_plgn_options_array_default, $fcbk_bttn_plgn_options_array );
|
138 |
-
update_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
|
139 |
-
}
|
140 |
-
}
|
141 |
-
|
142 |
-
//Function formed content of the plugin's admin page.
|
143 |
-
if( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
|
144 |
-
function fcbk_bttn_plgn_settings_page()
|
145 |
-
{
|
146 |
-
global $fcbk_bttn_plgn_options_array;
|
147 |
-
$copy = false;
|
148 |
-
|
149 |
-
if( @copy( plugin_dir_path( __FILE__ )."img/facebook-ico.jpg", plugin_dir_path( __FILE__ )."img/facebook-ico3.jpg" ) !== false )
|
150 |
-
$copy = true;
|
151 |
-
|
152 |
-
$message = "";
|
153 |
-
$error = "";
|
154 |
-
if( isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'fcbk_bttn_plgn_nonce_name' ) ) {
|
155 |
-
// Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options_array'.
|
156 |
-
if ( isset ( $_REQUEST['fcbk_bttn_plgn_where'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_link'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_display_option'] ) ) {
|
157 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] = $_REQUEST [ 'fcbk_bttn_plgn_link' ];
|
158 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] = $_REQUEST [ 'fcbk_bttn_plgn_where' ];
|
159 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] = $_REQUEST [ 'fcbk_bttn_plgn_display_option' ];
|
160 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] = isset( $_REQUEST [ 'fcbk_bttn_plgn_my_page' ] ) ? 1 : 0 ;
|
161 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] = isset( $_REQUEST [ 'fcbk_bttn_plgn_like' ] ) ? 1 : 0 ;
|
162 |
-
if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
|
163 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] + 1;
|
164 |
-
}
|
165 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] = $_REQUEST [ 'fcbk_bttn_plgn_locale' ];
|
166 |
-
|
167 |
-
if($fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] > 2)
|
168 |
-
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = 1;
|
169 |
-
update_option ( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
|
170 |
-
$message = __( "Options saved.", 'facebook' );
|
171 |
-
}
|
172 |
-
// Form options
|
173 |
-
if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
|
174 |
-
$max_image_width = 100;
|
175 |
-
$max_image_height = 40;
|
176 |
-
$max_image_size = 32 * 1024;
|
177 |
-
$valid_types = array( 'jpg', 'jpeg' );
|
178 |
-
// Construction to rename downloading file
|
179 |
-
$new_name = 'facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ];
|
180 |
-
$new_ext = '.jpg';
|
181 |
-
$namefile = $new_name.$new_ext;
|
182 |
-
$uploaddir = $_REQUEST [ 'home' ] . 'wp-content/plugins/facebook-button-plugin/img/'; // The directory in which we will take the file:
|
183 |
-
$uploadfile = $uploaddir.$namefile;
|
184 |
-
|
185 |
-
//checks is file download initiated by user
|
186 |
-
if ( isset ( $_FILES [ 'uploadfile' ] ) && $_REQUEST [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) {
|
187 |
-
//Checking is allowed download file given parameters
|
188 |
-
if ( is_uploaded_file( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) ) {
|
189 |
-
$filename = $_FILES [ 'uploadfile' ] [ 'tmp_name' ];
|
190 |
-
$ext = substr ( $_FILES [ 'uploadfile' ] [ 'name' ], 1 + strrpos( $_FILES [ 'uploadfile' ] [ 'name' ], '.' ) );
|
191 |
-
if ( filesize ( $filename ) > $max_image_size ) {
|
192 |
-
$error = __( "Error: File size > 32K", 'facebook' );
|
193 |
-
}
|
194 |
-
elseif ( ! in_array ( $ext, $valid_types ) ) {
|
195 |
-
$error = __( "Error: Invalid file type", 'facebook' );
|
196 |
-
}
|
197 |
-
else {
|
198 |
-
$size = GetImageSize ( $filename );
|
199 |
-
if ( ( $size ) && ( $size[0] <= $max_image_width ) && ( $size[1] <= $max_image_height ) ) {
|
200 |
-
//If file satisfies requirements, we will move them from temp to your plugin folder and rename to 'facebook_ico.jpg'
|
201 |
-
if (move_uploaded_file ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ], $uploadfile ) ) {
|
202 |
-
$message .= " Upload successful.";
|
203 |
-
}
|
204 |
-
else {
|
205 |
-
$error = __( "Error: moving file failed", 'facebook' );
|
206 |
-
}
|
207 |
-
}
|
208 |
-
else {
|
209 |
-
$error = __( "Error: check image width or height", 'facebook' );
|
210 |
-
}
|
211 |
-
}
|
212 |
-
}
|
213 |
-
else {
|
214 |
-
$error = __( "Uploading Error: check image properties", 'facebook' );
|
215 |
-
}
|
216 |
-
}
|
217 |
-
}
|
218 |
-
fcbk_bttn_plgn_update_option();
|
219 |
-
}
|
220 |
-
?>
|
221 |
-
<div class="wrap">
|
222 |
-
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
223 |
-
<h2><?php echo __( "FaceBook Button Options", 'facebook' ); ?></h2>
|
224 |
-
<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>
|
225 |
-
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
226 |
-
<div>
|
227 |
-
<form name="form1" method="post" action="admin.php?page=facebook-button-plugin.php" enctype="multipart/form-data" >
|
228 |
-
<table class="form-table">
|
229 |
-
<tr valign="top">
|
230 |
-
<th scope="row"><?php _e( "Your's FaceBook Id:", 'facebook' ); ?></th>
|
231 |
-
<td>
|
232 |
-
<input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] ?>' style="width:200px;" />
|
233 |
-
</td>
|
234 |
-
</tr>
|
235 |
-
<tr valign="top">
|
236 |
-
<th scope="row"><?php _e( "Display button:", 'facebook' ); ?></th>
|
237 |
-
<td>
|
238 |
-
<input name='fcbk_bttn_plgn_my_page' type='checkbox' value='1' <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) echo 'checked="checked "'; ?>/> <label for="fcbk_bttn_plgn_my_page"><?php echo __( "My Page", 'captcha' ); ?></label><br />
|
239 |
-
<input name='fcbk_bttn_plgn_like' type='checkbox' value='1' <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) echo 'checked="checked "'; ?>/> <label for="fcbk_bttn_plgn_like"><?php echo __( "Like", 'captcha' ); ?></label><br />
|
240 |
-
</td>
|
241 |
-
</tr>
|
242 |
-
<tr>
|
243 |
-
<th>
|
244 |
-
<?php echo __( "Choose display option:", 'facebook' ); ?>
|
245 |
-
</th>
|
246 |
-
<td>
|
247 |
-
<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;" >
|
248 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ) echo 'selected="selected"'; ?> value="standart"><?php echo __( "Standart FaceBook image", 'facebook' ); ?></option>
|
249 |
-
<?php if( $copy || $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) { ?>
|
250 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) echo 'selected="selected"'; ?> value="custom"><?php echo __( "Custom FaceBook image", 'facebook' ); ?></option>
|
251 |
-
<?php } ?>
|
252 |
-
</select>
|
253 |
-
</td>
|
254 |
-
</tr>
|
255 |
-
<tr>
|
256 |
-
<th>
|
257 |
-
<?php echo __( "Current image:", 'facebook' ); ?>
|
258 |
-
</th>
|
259 |
-
<td>
|
260 |
-
<img src="<?php echo $fcbk_bttn_plgn_options_array [ 'fb_img_link' ]; ?>" style="margin-left:2px;" />
|
261 |
-
</td>
|
262 |
-
</tr>
|
263 |
-
<tr>
|
264 |
-
<td colspan="2">
|
265 |
-
<div id="fcbk_bttn_plgn_display_option_custom" <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) { echo ( 'style="display:block"' ); } else {echo ( 'style="display:none"' ); }?>>
|
266 |
-
<table>
|
267 |
-
<th style="padding-left:0px;font-size:13px;">
|
268 |
-
<input type="hidden" name="MAX_FILE_SIZE" value="64000"/>
|
269 |
-
<input type="hidden" name="home" value="<?php echo ABSPATH ; ?>"/>
|
270 |
-
<?php echo __( "FaceBook image:", 'facebook' ); ?>
|
271 |
-
</th>
|
272 |
-
<td>
|
273 |
-
<input name="uploadfile" type="file" style="width:196px;" /><br />
|
274 |
-
<span style="color: rgb(136, 136, 136); font-size: 10px;"><?php echo __( 'Image properties: max image width:100px; max image height:40px; max image size:32Kb; image types:"jpg", "jpeg".', 'facebook' ); ?></span>
|
275 |
-
</td>
|
276 |
-
</table>
|
277 |
-
</div>
|
278 |
-
</td>
|
279 |
-
</tr>
|
280 |
-
<tr>
|
281 |
-
<th>
|
282 |
-
<?php echo __( "FaceBook Button Position:", 'facebook' ); ?>
|
283 |
-
</th>
|
284 |
-
<td>
|
285 |
-
<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;" >
|
286 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'before' ) echo 'selected="selected"'; ?> value="before"><?php echo __( "Before", 'facebook' ); ?></option>
|
287 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'after' ) echo 'selected="selected"'; ?> value="after"><?php echo __( "After", 'facebook' ); ?></option>
|
288 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'beforeandafter' ) echo 'selected="selected"'; ?> value="beforeandafter"><?php echo __( "Before and After", 'facebook' ); ?></option>
|
289 |
-
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'shortcode') echo 'selected="selected"'; ?> value="shortcode"><?php echo __( "Shortcode", 'facebook' ); ?></option>
|
290 |
-
</select>
|
291 |
-
<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 put this shortcode onto your post or page:", 'facebook' ); ?> [fb_button].</span>
|
292 |
-
</td>
|
293 |
-
</tr>
|
294 |
-
<tr>
|
295 |
-
<th>
|
296 |
-
<?php echo __( "FaceBook Button language:", 'facebook' ); ?>
|
297 |
-
</th>
|
298 |
-
<td>
|
299 |
-
<select name="fcbk_bttn_plgn_locale">
|
300 |
-
<option value="af_ZA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "af_ZA" ) echo 'selected="selected"'; ?>>Afrikaans</option>
|
301 |
-
<option value="ar_AR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ar_AR" ) echo 'selected="selected"'; ?>>العربية</option>
|
302 |
-
<option value="ay_BO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ay_BO" ) echo 'selected="selected"'; ?>>Aymar aru</option>
|
303 |
-
<option value="az_AZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "az_AZ" ) echo 'selected="selected"'; ?>>Azərbaycan dili</option>
|
304 |
-
<option value="be_BY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "be_BY" ) echo 'selected="selected"'; ?>>Беларуская</option>
|
305 |
-
<option value="bg_BG" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bg_BG" ) echo 'selected="selected"'; ?>>Български</option>
|
306 |
-
<option value="bn_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bn_IN" ) echo 'selected="selected"'; ?>>বাংলা</option>
|
307 |
-
<option value="bs_BA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bs_BA" ) echo 'selected="selected"'; ?>>Bosanski</option>
|
308 |
-
<option value="ca_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ca_ES" ) echo 'selected="selected"'; ?>>Català</option>
|
309 |
-
<option value="ck_US" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ck_US" ) echo 'selected="selected"'; ?>>Cherokee</option>
|
310 |
-
<option value="cs_CZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "cs_CZ" ) echo 'selected="selected"'; ?>>Čeština</option>
|
311 |
-
<option value="cy_GB" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "cy_GB" ) echo 'selected="selected"'; ?>>Cymraeg</option>
|
312 |
-
<option value="da_DK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "da_DK" ) echo 'selected="selected"'; ?>>Dansk</option>
|
313 |
-
<option value="de_DE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "de_DE" ) echo 'selected="selected"'; ?>>Deutsch</option>
|
314 |
-
<option value="el_GR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "el_GR" ) echo 'selected="selected"'; ?>>Ελληνικά</option>
|
315 |
-
<option value="en_US" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "en_US" ) echo 'selected="selected"'; ?>>English</option>
|
316 |
-
<option value="en_PI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "en_PI" ) echo 'selected="selected"'; ?>>English (Pirate)</option>
|
317 |
-
<option value="eo_EO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "eo_EO" ) echo 'selected="selected"'; ?>>Esperanto</option>
|
318 |
-
<option value="es_CL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_CL" ) echo 'selected="selected"'; ?>>Español (Chile)</option>
|
319 |
-
<option value="es_CO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_CO" ) echo 'selected="selected"'; ?>>Español (Colombia)</option>
|
320 |
-
<option value="es_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_ES" ) echo 'selected="selected"'; ?>>Español (España)</option>
|
321 |
-
<option value="es_LA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_LA" ) echo 'selected="selected"'; ?>>Español</option>
|
322 |
-
<option value="es_MX" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_MX" ) echo 'selected="selected"'; ?>>Español (México)</option>
|
323 |
-
<option value="es_VE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_VE" ) echo 'selected="selected"'; ?>>Español (Venezuela)</option>
|
324 |
-
<option value="et_EE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "et_EE" ) echo 'selected="selected"'; ?>>Eesti</option>
|
325 |
-
<option value="eu_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "eu_ES" ) echo 'selected="selected"'; ?>>Euskara</option>
|
326 |
-
<option value="fa_IR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fa_IR" ) echo 'selected="selected"'; ?>>فارسی</option>
|
327 |
-
<option value="fb_LT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fb_LT" ) echo 'selected="selected"'; ?>>Leet Speak</option>
|
328 |
-
<option value="fi_FI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fi_FI" ) echo 'selected="selected"'; ?>>Suomi</option>
|
329 |
-
<option value="fo_FO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fo_FO" ) echo 'selected="selected"'; ?>>Føroyskt</option>
|
330 |
-
<option value="fr_CA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fr_CA" ) echo 'selected="selected"'; ?>>Français (Canada)</option>
|
331 |
-
<option value="fr_FR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fr_FR" ) echo 'selected="selected"'; ?>>Français (France)</option>
|
332 |
-
<option value="fy_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fy_NL" ) echo 'selected="selected"'; ?>>Frysk</option>
|
333 |
-
<option value="ga_IE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ga_IE" ) echo 'selected="selected"'; ?>>Gaeilge</option>
|
334 |
-
<option value="gl_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gl_ES" ) echo 'selected="selected"'; ?>>Galego</option>
|
335 |
-
<option value="gn_PY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gn_PY" ) echo 'selected="selected"'; ?>>Avañe'ẽ</option>
|
336 |
-
<option value="gu_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gu_IN" ) echo 'selected="selected"'; ?>>ગુજરાતી</option>
|
337 |
-
<option value="gx_GR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gx_GR" ) echo 'selected="selected"'; ?>>Ἑλληνική ἀρχαία</option>
|
338 |
-
<option value="he_IL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "he_IL" ) echo 'selected="selected"'; ?>>עברית</option>
|
339 |
-
<option value="hi_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hi_IN" ) echo 'selected="selected"'; ?>>हिन्दी</option>
|
340 |
-
<option value="hr_HR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hr_HR" ) echo 'selected="selected"'; ?>>Hrvatski</option>
|
341 |
-
<option value="hu_HU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hu_HU" ) echo 'selected="selected"'; ?>>Magyar</option>
|
342 |
-
<option value="hy_AM" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hy_AM" ) echo 'selected="selected"'; ?>>Հայերեն</option>
|
343 |
-
<option value="id_ID" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "id_ID" ) echo 'selected="selected"'; ?>>Bahasa Indonesia</option>
|
344 |
-
<option value="is_IS" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "is_IS" ) echo 'selected="selected"'; ?>>Íslenska</option>
|
345 |
-
<option value="it_IT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "it_IT" ) echo 'selected="selected"'; ?>>Italiano</option>
|
346 |
-
<option value="ja_JP" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ja_JP" ) echo 'selected="selected"'; ?>>日本語</option>
|
347 |
-
<option value="jv_ID" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "jv_ID" ) echo 'selected="selected"'; ?>>Basa Jawa</option>
|
348 |
-
<option value="ka_GE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ka_GE" ) echo 'selected="selected"'; ?>>ქართული</option>
|
349 |
-
<option value="kk_KZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "kk_KZ" ) echo 'selected="selected"'; ?>>Қазақша</option>
|
350 |
-
<option value="km_KH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "km_KH" ) echo 'selected="selected"'; ?>>ភាសាខ្មែរ</option>
|
351 |
-
<option value="kn_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "kn_IN" ) echo 'selected="selected"'; ?>>ಕನ್ನಡ</option>
|
352 |
-
<option value="ko_KR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ko_KR" ) echo 'selected="selected"'; ?>>한국어</option>
|
353 |
-
<option value="ku_TR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ku_TR" ) echo 'selected="selected"'; ?>>Kurdî</option>
|
354 |
-
<option value="la_VA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "la_VA" ) echo 'selected="selected"'; ?>>lingua latina</option>
|
355 |
-
<option value="li_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "li_NL" ) echo 'selected="selected"'; ?>>Limburgs</option>
|
356 |
-
<option value="lt_LT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "lt_LT" ) echo 'selected="selected"'; ?>>Lietuvių</option>
|
357 |
-
<option value="lv_LV" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "lv_LV" ) echo 'selected="selected"'; ?>>Latviešu</option>
|
358 |
-
<option value="mg_MG" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mg_MG" ) echo 'selected="selected"'; ?>>Malagasy</option>
|
359 |
-
<option value="mk_MK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mk_MK" ) echo 'selected="selected"'; ?>>Македонски</option>
|
360 |
-
<option value="ml_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ml_IN" ) echo 'selected="selected"'; ?>>മലയാളം</option>
|
361 |
-
<option value="mn_MN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mn_MN" ) echo 'selected="selected"'; ?>>Монгол</option>
|
362 |
-
<option value="mr_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mr_IN" ) echo 'selected="selected"'; ?>>मराठी</option>
|
363 |
-
<option value="ms_MY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ms_MY" ) echo 'selected="selected"'; ?>>Bahasa Melayu</option>
|
364 |
-
<option value="mt_MT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mt_MT" ) echo 'selected="selected"'; ?>>Malti</option>
|
365 |
-
<option value="nb_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nb_NO" ) echo 'selected="selected"'; ?>>Norsk (bokmål)</option>
|
366 |
-
<option value="ne_NP" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ne_NP" ) echo 'selected="selected"'; ?>>नेपाली</option>
|
367 |
-
<option value="nl_BE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nl_BE" ) echo 'selected="selected"'; ?>>Nederlands (België)</option>
|
368 |
-
<option value="nl_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nl_NL" ) echo 'selected="selected"'; ?>>Nederlands</option>
|
369 |
-
<option value="nn_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nn_NO" ) echo 'selected="selected"'; ?>>Norsk (nynorsk)</option>
|
370 |
-
<option value="pa_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pa_IN" ) echo 'selected="selected"'; ?>>ਪੰਜਾਬੀ</option>
|
371 |
-
<option value="pl_PL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pl_PL" ) echo 'selected="selected"'; ?>>Polski</option>
|
372 |
-
<option value="ps_AF" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ps_AF" ) echo 'selected="selected"'; ?>>پښتو</option>
|
373 |
-
<option value="pt_BR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pt_BR" ) echo 'selected="selected"'; ?>>Português (Brasil)</option>
|
374 |
-
<option value="pt_PT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pt_PT" ) echo 'selected="selected"'; ?>>Português (Portugal)</option>
|
375 |
-
<option value="qu_PE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "qu_PE" ) echo 'selected="selected"'; ?>>Qhichwa</option>
|
376 |
-
<option value="rm_CH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "rm_CH" ) echo 'selected="selected"'; ?>>Rumantsch</option>
|
377 |
-
<option value="ro_RO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ro_RO" ) echo 'selected="selected"'; ?>>Română</option>
|
378 |
-
<option value="ru_RU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ru_RU" ) echo 'selected="selected"'; ?>>Русский</option>
|
379 |
-
<option value="sa_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sa_IN" ) echo 'selected="selected"'; ?>>संस्कृतम्</option>
|
380 |
-
<option value="se_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "se_NO" ) echo 'selected="selected"'; ?>>Davvisámegiella</option>
|
381 |
-
<option value="sk_SK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sk_SK" ) echo 'selected="selected"'; ?>>Slovenčina</option>
|
382 |
-
<option value="sl_SI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sl_SI" ) echo 'selected="selected"'; ?>>Slovenščina</option>
|
383 |
-
<option value="so_SO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "so_SO" ) echo 'selected="selected"'; ?>>Soomaaliga</option>
|
384 |
-
<option value="sq_AL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sq_AL" ) echo 'selected="selected"'; ?>>Shqip</option>
|
385 |
-
<option value="sr_RS" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sr_RS" ) echo 'selected="selected"'; ?>>Српски</option>
|
386 |
-
<option value="sv_SE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sv_SE" ) echo 'selected="selected"'; ?>>Svenska</option>
|
387 |
-
<option value="sw_KE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sw_KE" ) echo 'selected="selected"'; ?>>Kiswahili</option>
|
388 |
-
<option value="sy_SY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sy_SY" ) echo 'selected="selected"'; ?>>ܐܪܡܝܐ</option>
|
389 |
-
<option value="ta_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ta_IN" ) echo 'selected="selected"'; ?>>தமிழ்</option>
|
390 |
-
<option value="te_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "te_IN" ) echo 'selected="selected"'; ?>>తెలుగు</option>
|
391 |
-
<option value="tg_TJ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tg_TJ" ) echo 'selected="selected"'; ?>>тоҷикӣ</option>
|
392 |
-
<option value="th_TH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "th_TH" ) echo 'selected="selected"'; ?>>ภาษาไทย</option>
|
393 |
-
<option value="tl_PH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tl_PH" ) echo 'selected="selected"'; ?>>Filipino</option>
|
394 |
-
<option value="tl_ST" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tl_ST" ) echo 'selected="selected"'; ?>>tlhIngan-Hol</option>
|
395 |
-
<option value="tr_TR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tr_TR" ) echo 'selected="selected"'; ?>>Türkçe</option>
|
396 |
-
<option value="tt_RU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tt_RU" ) echo 'selected="selected"'; ?>>Татарча</option>
|
397 |
-
<option value="uk_UA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "uk_UA" ) echo 'selected="selected"'; ?>>Українська</option>
|
398 |
-
<option value="ur_PK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ur_PK" ) echo 'selected="selected"'; ?>>اردو</option>
|
399 |
-
<option value="uz_UZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "uz_UZ" ) echo 'selected="selected"'; ?>>O'zbek</option>
|
400 |
-
<option value="vi_VN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "vi_VN" ) echo 'selected="selected"'; ?>>Tiếng Việt</option>
|
401 |
-
<option value="yi_DE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "yi_DE" ) echo 'selected="selected"'; ?>>ייִדיש</option>
|
402 |
-
<option value="zh_CN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_CN" ) echo 'selected="selected"'; ?>>中文(简体)</option>
|
403 |
-
<option value="zh_HK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_HK" ) echo 'selected="selected"'; ?>>中文(香港)</option>
|
404 |
-
<option value="zh_TW" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_TW" ) echo 'selected="selected"'; ?>>中文(台灣)</option>
|
405 |
-
<option value="zu_ZA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zu_ZA" ) echo 'selected="selected"'; ?>>isiZulu</option>
|
406 |
-
</select>
|
407 |
-
<span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; display:inline"><?php echo __( "Select language for Like button", 'facebook' ); ?></span>
|
408 |
-
</td>
|
409 |
-
</tr>
|
410 |
-
<tr>
|
411 |
-
<td colspan="2">
|
412 |
-
<input type="hidden" name="fcbk_bttn_plgn_form_submit" value="submit" />
|
413 |
-
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
414 |
-
</td>
|
415 |
-
</tr>
|
416 |
-
</table>
|
417 |
-
<?php wp_nonce_field( plugin_basename(__FILE__), 'fcbk_bttn_plgn_nonce_name' ); ?>
|
418 |
-
</form>
|
419 |
-
</div>
|
420 |
-
</div>
|
421 |
-
|
422 |
-
<?php
|
423 |
-
}
|
424 |
-
}
|
425 |
-
|
426 |
-
//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'
|
427 |
-
if( ! function_exists( 'fcbk_bttn_plgn_update_option' ) ) {
|
428 |
-
function fcbk_bttn_plgn_update_option () {
|
429 |
-
global $fcbk_bttn_plgn_options_array;
|
430 |
-
if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ){
|
431 |
-
$fb_img_link = plugins_url( 'img/standart-facebook-ico.jpg', __FILE__ );
|
432 |
-
} else if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom'){
|
433 |
-
$fb_img_link = plugins_url( 'img/facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ].'.jpg', __FILE__ );
|
434 |
-
}
|
435 |
-
$fcbk_bttn_plgn_options_array [ 'fb_img_link' ] = $fb_img_link ;
|
436 |
-
update_option( "fcbk_bttn_plgn_options_array", $fcbk_bttn_plgn_options_array );
|
437 |
-
}
|
438 |
-
}
|
439 |
-
|
440 |
-
//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.
|
441 |
-
if( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
|
442 |
-
function fcbk_bttn_plgn_display_button ( $content ) {
|
443 |
-
global $post;
|
444 |
-
//Query the database to receive array 'fcbk_bttn_plgn_options_array' and receiving necessary information to create button
|
445 |
-
$fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
|
446 |
-
$fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
|
447 |
-
$img = $fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
|
448 |
-
$url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
|
449 |
-
$permalink_post = get_permalink ( $post->ID );
|
450 |
-
//Button
|
451 |
-
$button = '<div id="fcbk_share">';
|
452 |
-
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) {
|
453 |
-
$button .= '<div class="fcbk_button">
|
454 |
-
<a name="fcbk_share" href="http://www.facebook.com/' . $url . '" target="blank">
|
455 |
-
<img src="' . $img . '" alt="Fb-Button" />
|
456 |
-
</a>
|
457 |
-
</div>';
|
458 |
-
}
|
459 |
-
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) {
|
460 |
-
$button .= '<div class="fcbk_like">
|
461 |
-
<div id="fb-root"></div>
|
462 |
-
<script src="http://connect.facebook.net/'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ].'/all.js#appId=224313110927811&xfbml=1"></script>
|
463 |
-
<fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
|
464 |
-
</div>';
|
465 |
-
}
|
466 |
-
|
467 |
-
$button .= '</div>';
|
468 |
-
//Indication where show FaceBook Button depending on selected item in admin page.
|
469 |
-
if ( $fcbk_bttn_plgn_where == 'before' ) {
|
470 |
-
return $button . $content;
|
471 |
-
} else if ( $fcbk_bttn_plgn_where == 'after' ) {
|
472 |
-
return $content . $button;
|
473 |
-
} else if ( $fcbk_bttn_plgn_where == 'beforeandafter' ) {
|
474 |
-
return $button . $content . $button;
|
475 |
-
} else if ( $fcbk_bttn_plgn_where == 'shortcode' ) {
|
476 |
-
return $content;
|
477 |
-
} else {
|
478 |
-
return $content;
|
479 |
-
}
|
480 |
-
}
|
481 |
-
}
|
482 |
-
|
483 |
-
//Function 'fcbk_bttn_plgn_shortcode' are using to create shortcode by FaceBook Button.
|
484 |
-
if( ! function_exists( 'fcbk_bttn_plgn_shortcode' ) ) {
|
485 |
-
function fcbk_bttn_plgn_shortcode( $content ) {
|
486 |
-
$fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
|
487 |
-
$fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
|
488 |
-
$img = $fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
|
489 |
-
$url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
|
490 |
-
$permalink_post = get_permalink ( $post_ID );
|
491 |
-
$button = '<div id="fcbk_share">';
|
492 |
-
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) {
|
493 |
-
$button .= '<div class="fcbk_button">
|
494 |
-
<a name="fcbk_share" href="http://www.facebook.com/' . $url . '" target="blank">
|
495 |
-
<img src="' . $img . '" alt="Fb-Button" />
|
496 |
-
</a>
|
497 |
-
</div>';
|
498 |
-
}
|
499 |
-
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) {
|
500 |
-
$button .= '<div class="fcbk_like">
|
501 |
-
<div id="fb-root"></div>
|
502 |
-
<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&xfbml=1"></script>
|
503 |
-
<fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
|
504 |
-
</div>';
|
505 |
-
}
|
506 |
-
|
507 |
-
$button .= '</div>';
|
508 |
-
return $button;
|
509 |
-
}
|
510 |
-
}
|
511 |
-
|
512 |
-
//Function 'fcbk_bttn_plgn_action_links' are using to create action links on admin page.
|
513 |
-
if( ! function_exists( 'fcbk_bttn_plgn_action_links' ) ) {
|
514 |
-
function fcbk_bttn_plgn_action_links( $links, $file ) {
|
515 |
-
//Static so we don't call plugin_basename on every plugin row.
|
516 |
-
static $this_plugin;
|
517 |
-
if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
|
518 |
-
|
519 |
-
if ( $file == $this_plugin ){
|
520 |
-
$settings_link = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings', 'facebook' ) . '</a>';
|
521 |
-
array_unshift( $links, $settings_link );
|
522 |
-
}
|
523 |
-
return $links;
|
524 |
-
}
|
525 |
-
} // end function fcbk_bttn_plgn_action_links
|
526 |
-
|
527 |
-
//Function 'fcbk_bttn_plgn_links' are using to create other links on admin page.
|
528 |
-
if ( ! function_exists ( 'fcbk_bttn_plgn_links' ) ) {
|
529 |
-
function fcbk_bttn_plgn_links($links, $file) {
|
530 |
-
$base = plugin_basename(__FILE__);
|
531 |
-
if ($file == $base) {
|
532 |
-
$links[] = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings','facebook' ) . '</a>';
|
533 |
-
$links[] = '<a href="http://wordpress.org/extend/plugins/facebook-button-plugin/faq/" target="_blank">' . __( 'FAQ','facebook' ) . '</a>';
|
534 |
-
$links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __( 'Support','facebook' ) . '</a>';
|
535 |
-
}
|
536 |
-
return $links;
|
537 |
-
}
|
538 |
-
} // end function fcbk_bttn_plgn_links
|
539 |
-
|
540 |
-
//Function '_plugin_init' are using to add language files.
|
541 |
-
if ( ! function_exists ( 'fcbk_plugin_init' ) ) {
|
542 |
-
function fcbk_plugin_init() {
|
543 |
-
load_plugin_textdomain( 'facebook', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
544 |
-
}
|
545 |
-
} // end function fcbk_plugin_init
|
546 |
-
|
547 |
-
|
548 |
-
if ( ! function_exists ( 'fcbk_admin_head' ) ) {
|
549 |
-
function fcbk_admin_head() {
|
550 |
-
wp_register_style( 'fcbkStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
|
551 |
-
wp_enqueue_style( 'fcbkStylesheet' );
|
552 |
-
}
|
553 |
-
}
|
554 |
-
|
555 |
-
//Add language files
|
556 |
-
add_action( 'init', 'fcbk_plugin_init' );
|
557 |
-
|
558 |
-
add_action( 'wp_enqueue_scripts', 'fcbk_admin_head' );
|
559 |
-
add_action( 'admin_enqueue_scripts', 'fcbk_admin_head' );
|
560 |
-
|
561 |
-
// adds "Settings" link to the plugin action page
|
562 |
-
add_filter( 'plugin_action_links', 'fcbk_bttn_plgn_action_links', 10, 2 );
|
563 |
-
|
564 |
-
//Additional links on the plugin page
|
565 |
-
add_filter( 'plugin_row_meta', 'fcbk_bttn_plgn_links', 10, 2 );
|
566 |
-
|
567 |
-
//Calling a function add administrative menu.
|
568 |
-
add_action( 'admin_menu', 'fcbk_bttn_plgn_add_pages' );
|
569 |
-
|
570 |
-
//Add shortcode.
|
571 |
-
add_shortcode( 'fb_button', 'fcbk_bttn_plgn_shortcode' );
|
572 |
-
|
573 |
-
//Add settings links.
|
574 |
-
add_filter( 'the_content', 'fcbk_bttn_plgn_display_button' );
|
575 |
-
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
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.17
|
8 |
+
Author URI: http://bestwebsoft.com/
|
9 |
+
License: GPLv2 or later
|
10 |
+
*/
|
11 |
+
|
12 |
+
/* Copyright 2011 BestWebSoft ( plugin@bestwebsoft.com )
|
13 |
+
|
14 |
+
This program is free software; you can redistribute it and/or modify
|
15 |
+
it under the terms of the GNU General Public License, version 2, as
|
16 |
+
published by the Free Software Foundation.
|
17 |
+
|
18 |
+
This program is distributed in the hope that it will be useful,
|
19 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
GNU General Public License for more details.
|
22 |
+
|
23 |
+
You should have received a copy of the GNU General Public License
|
24 |
+
along with this program; if not, write to the Free Software
|
25 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
+
*/
|
27 |
+
|
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/plugin-install.php?tab=search&type=term&s=Captcha+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=captcha.php' ),
|
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/plugin-install.php?tab=search&type=term&s=Contact+Form+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=contact_form.php' ),
|
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/plugin-install.php?tab=search&type=term&s=Facebook+Like+Button+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=facebook-button-plugin.php' ),
|
42 |
+
array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Twitter+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=twitter.php' ),
|
43 |
+
array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Portfolio+bestwebsoft&plugin-search-input=Search+Plugins', '' ),
|
44 |
+
array( 'gallery-plugin\/gallery-plugin.php', 'Gallery', 'http://wordpress.org/extend/plugins/gallery-plugin/', 'http://bestwebsoft.com/plugin/gallery-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Gallery+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', '' ),
|
45 |
+
array( 'adsense-plugin\/adsense-plugin.php', 'Google AdSense Plugin', 'http://wordpress.org/extend/plugins/adsense-plugin/', 'http://bestwebsoft.com/plugin/google-adsense-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Adsense+Plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=adsense-plugin.php' ),
|
46 |
+
array( 'custom-search-plugin\/custom-search-plugin.php', 'Custom Search Plugin', 'http://wordpress.org/extend/plugins/custom-search-plugin/', 'http://bestwebsoft.com/plugin/custom-search-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Custom+Search+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=custom_search.php' ),
|
47 |
+
array( 'quotes-and-tips\/quotes-and-tips.php', 'Quotes and Tips', 'http://wordpress.org/extend/plugins/quotes-and-tips/', 'http://bestwebsoft.com/plugin/quotes-and-tips/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Quotes+and+Tips+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=quotes-and-tips.php' ),
|
48 |
+
array( 'google-sitemap-plugin\/google-sitemap-plugin.php', 'Google sitemap plugin', 'http://wordpress.org/extend/plugins/google-sitemap-plugin/', 'http://bestwebsoft.com/plugin/google-sitemap-plugin/', '/wp-admin/plugin-install.php?tab=search&type=term&s=Google+sitemap+plugin+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=google-sitemap-plugin.php' ),
|
49 |
+
array( 'updater\/updater.php', 'Updater', 'http://wordpress.org/extend/plugins/updater/', 'http://bestwebsoft.com/plugin/updater/', '/wp-admin/plugin-install.php?tab=search&s=updater+bestwebsoft&plugin-search-input=Search+Plugins', 'admin.php?page=updater-options' )
|
50 |
+
);
|
51 |
+
foreach($array_plugins as $plugins) {
|
52 |
+
if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) ) {
|
53 |
+
$array_activate[$count_activate]['title'] = $plugins[1];
|
54 |
+
$array_activate[$count_activate]['link'] = $plugins[2];
|
55 |
+
$array_activate[$count_activate]['href'] = $plugins[3];
|
56 |
+
$array_activate[$count_activate]['url'] = $plugins[5];
|
57 |
+
$count_activate++;
|
58 |
+
}
|
59 |
+
else if( array_key_exists(str_replace("\\", "", $plugins[0]), $all_plugins) ) {
|
60 |
+
$array_install[$count_install]['title'] = $plugins[1];
|
61 |
+
$array_install[$count_install]['link'] = $plugins[2];
|
62 |
+
$array_install[$count_install]['href'] = $plugins[3];
|
63 |
+
$count_install++;
|
64 |
+
}
|
65 |
+
else {
|
66 |
+
$array_recomend[$count_recomend]['title'] = $plugins[1];
|
67 |
+
$array_recomend[$count_recomend]['link'] = $plugins[2];
|
68 |
+
$array_recomend[$count_recomend]['href'] = $plugins[3];
|
69 |
+
$array_recomend[$count_recomend]['slug'] = $plugins[4];
|
70 |
+
$count_recomend++;
|
71 |
+
}
|
72 |
+
}
|
73 |
+
?>
|
74 |
+
<div class="wrap">
|
75 |
+
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
76 |
+
<h2><?php echo $title;?></h2>
|
77 |
+
<?php if( 0 < $count_activate ) { ?>
|
78 |
+
<div>
|
79 |
+
<h3><?php _e( 'Activated plugins', 'facebook' ); ?></h3>
|
80 |
+
<?php foreach( $array_activate as $activate_plugin ) { ?>
|
81 |
+
<div style="float:left; width:200px;"><?php echo $activate_plugin['title']; ?></div> <p><a href="<?php echo $activate_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a> <a href="<?php echo $activate_plugin['url']; ?>"><?php echo __( "Settings", 'facebook'); ?></a></p>
|
82 |
+
<?php } ?>
|
83 |
+
</div>
|
84 |
+
<?php } ?>
|
85 |
+
<?php if( 0 < $count_install ) { ?>
|
86 |
+
<div>
|
87 |
+
<h3><?php _e( 'Installed plugins', 'facebook' ); ?></h3>
|
88 |
+
<?php foreach($array_install as $install_plugin) { ?>
|
89 |
+
<div style="float:left; width:200px;"><?php echo $install_plugin['title']; ?></div> <p><a href="<?php echo $install_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a></p>
|
90 |
+
<?php } ?>
|
91 |
+
</div>
|
92 |
+
<?php } ?>
|
93 |
+
<?php if( 0 < $count_recomend ) { ?>
|
94 |
+
<div>
|
95 |
+
<h3><?php _e( 'Recommended plugins', 'facebook' ); ?></h3>
|
96 |
+
<?php foreach( $array_recomend as $recomend_plugin ) { ?>
|
97 |
+
<div style="float:left; width:200px;"><?php echo $recomend_plugin['title']; ?></div> <p><a href="<?php echo $recomend_plugin['link']; ?>" target="_blank"><?php echo __( "Read more", 'facebook'); ?></a> <a href="<?php echo $recomend_plugin['href']; ?>" target="_blank"><?php echo __( "Download", 'facebook'); ?></a> <a class="install-now" href="<?php echo get_bloginfo( "url" ) . $recomend_plugin['slug']; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin['title'] ) ) ?>" target="_blank"><?php echo __( 'Install now from wordpress.org', 'facebook' ) ?></a></p>
|
98 |
+
<?php } ?>
|
99 |
+
<span style="color: rgb(136, 136, 136); font-size: 10px;"><?php _e( 'If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site', 'facebook' ); ?> <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
|
100 |
+
</div>
|
101 |
+
<?php } ?>
|
102 |
+
</div>
|
103 |
+
<?php
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
if( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
|
108 |
+
function fcbk_bttn_plgn_add_pages() {
|
109 |
+
add_menu_page( 'BWS Plugins', 'BWS Plugins', 'manage_options', 'bws_plugins', 'bws_add_menu_render', plugins_url( "img/px.png", __FILE__ ), 1001);
|
110 |
+
add_submenu_page( 'bws_plugins', __( 'FaceBook Button Options', 'facebook' ), __( 'FaceBook Button', 'facebook' ), 'manage_options', "facebook-button-plugin.php", 'fcbk_bttn_plgn_settings_page');
|
111 |
+
|
112 |
+
//call register settings function
|
113 |
+
add_action( 'admin_init', 'fcbk_bttn_plgn_settings' );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
if( ! function_exists( 'fcbk_bttn_plgn_settings' ) ) {
|
118 |
+
function fcbk_bttn_plgn_settings() {
|
119 |
+
global $fcbk_bttn_plgn_options_array;
|
120 |
+
|
121 |
+
$fcbk_bttn_plgn_options_array_default = array(
|
122 |
+
'fcbk_bttn_plgn_link' => '',
|
123 |
+
'fcbk_bttn_plgn_my_page' => 1,
|
124 |
+
'fcbk_bttn_plgn_like' => 1,
|
125 |
+
'fcbk_bttn_plgn_where' => '',
|
126 |
+
'fcbk_bttn_plgn_display_option' => '',
|
127 |
+
'fcbk_bttn_plgn_count_icon' => 1,
|
128 |
+
'fb_img_link' => plugins_url( "img/standart-facebook-ico.jpg", __FILE__ ),
|
129 |
+
'fcbk_bttn_plgn_locale' => 'en_US'
|
130 |
+
);
|
131 |
+
|
132 |
+
if( ! get_option( 'fcbk_bttn_plgn_options_array' ) )
|
133 |
+
add_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array_default, '', 'yes' );
|
134 |
+
|
135 |
+
$fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
|
136 |
+
|
137 |
+
$fcbk_bttn_plgn_options_array = array_merge( $fcbk_bttn_plgn_options_array_default, $fcbk_bttn_plgn_options_array );
|
138 |
+
update_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
|
139 |
+
}
|
140 |
+
}
|
141 |
+
|
142 |
+
//Function formed content of the plugin's admin page.
|
143 |
+
if( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
|
144 |
+
function fcbk_bttn_plgn_settings_page()
|
145 |
+
{
|
146 |
+
global $fcbk_bttn_plgn_options_array;
|
147 |
+
$copy = false;
|
148 |
+
|
149 |
+
if( @copy( plugin_dir_path( __FILE__ )."img/facebook-ico.jpg", plugin_dir_path( __FILE__ )."img/facebook-ico3.jpg" ) !== false )
|
150 |
+
$copy = true;
|
151 |
+
|
152 |
+
$message = "";
|
153 |
+
$error = "";
|
154 |
+
if( isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) && check_admin_referer( plugin_basename(__FILE__), 'fcbk_bttn_plgn_nonce_name' ) ) {
|
155 |
+
// Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options_array'.
|
156 |
+
if ( isset ( $_REQUEST['fcbk_bttn_plgn_where'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_link'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_display_option'] ) ) {
|
157 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] = $_REQUEST [ 'fcbk_bttn_plgn_link' ];
|
158 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] = $_REQUEST [ 'fcbk_bttn_plgn_where' ];
|
159 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] = $_REQUEST [ 'fcbk_bttn_plgn_display_option' ];
|
160 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] = isset( $_REQUEST [ 'fcbk_bttn_plgn_my_page' ] ) ? 1 : 0 ;
|
161 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] = isset( $_REQUEST [ 'fcbk_bttn_plgn_like' ] ) ? 1 : 0 ;
|
162 |
+
if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
|
163 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] + 1;
|
164 |
+
}
|
165 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] = $_REQUEST [ 'fcbk_bttn_plgn_locale' ];
|
166 |
+
|
167 |
+
if($fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] > 2)
|
168 |
+
$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = 1;
|
169 |
+
update_option ( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
|
170 |
+
$message = __( "Options saved.", 'facebook' );
|
171 |
+
}
|
172 |
+
// Form options
|
173 |
+
if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
|
174 |
+
$max_image_width = 100;
|
175 |
+
$max_image_height = 40;
|
176 |
+
$max_image_size = 32 * 1024;
|
177 |
+
$valid_types = array( 'jpg', 'jpeg' );
|
178 |
+
// Construction to rename downloading file
|
179 |
+
$new_name = 'facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ];
|
180 |
+
$new_ext = '.jpg';
|
181 |
+
$namefile = $new_name.$new_ext;
|
182 |
+
$uploaddir = $_REQUEST [ 'home' ] . 'wp-content/plugins/facebook-button-plugin/img/'; // The directory in which we will take the file:
|
183 |
+
$uploadfile = $uploaddir.$namefile;
|
184 |
+
|
185 |
+
//checks is file download initiated by user
|
186 |
+
if ( isset ( $_FILES [ 'uploadfile' ] ) && $_REQUEST [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) {
|
187 |
+
//Checking is allowed download file given parameters
|
188 |
+
if ( is_uploaded_file( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) ) {
|
189 |
+
$filename = $_FILES [ 'uploadfile' ] [ 'tmp_name' ];
|
190 |
+
$ext = substr ( $_FILES [ 'uploadfile' ] [ 'name' ], 1 + strrpos( $_FILES [ 'uploadfile' ] [ 'name' ], '.' ) );
|
191 |
+
if ( filesize ( $filename ) > $max_image_size ) {
|
192 |
+
$error = __( "Error: File size > 32K", 'facebook' );
|
193 |
+
}
|
194 |
+
elseif ( ! in_array ( $ext, $valid_types ) ) {
|
195 |
+
$error = __( "Error: Invalid file type", 'facebook' );
|
196 |
+
}
|
197 |
+
else {
|
198 |
+
$size = GetImageSize ( $filename );
|
199 |
+
if ( ( $size ) && ( $size[0] <= $max_image_width ) && ( $size[1] <= $max_image_height ) ) {
|
200 |
+
//If file satisfies requirements, we will move them from temp to your plugin folder and rename to 'facebook_ico.jpg'
|
201 |
+
if (move_uploaded_file ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ], $uploadfile ) ) {
|
202 |
+
$message .= " Upload successful.";
|
203 |
+
}
|
204 |
+
else {
|
205 |
+
$error = __( "Error: moving file failed", 'facebook' );
|
206 |
+
}
|
207 |
+
}
|
208 |
+
else {
|
209 |
+
$error = __( "Error: check image width or height", 'facebook' );
|
210 |
+
}
|
211 |
+
}
|
212 |
+
}
|
213 |
+
else {
|
214 |
+
$error = __( "Uploading Error: check image properties", 'facebook' );
|
215 |
+
}
|
216 |
+
}
|
217 |
+
}
|
218 |
+
fcbk_bttn_plgn_update_option();
|
219 |
+
}
|
220 |
+
?>
|
221 |
+
<div class="wrap">
|
222 |
+
<div class="icon32 icon32-bws" id="icon-options-general"></div>
|
223 |
+
<h2><?php echo __( "FaceBook Button Options", 'facebook' ); ?></h2>
|
224 |
+
<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>
|
225 |
+
<div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
|
226 |
+
<div>
|
227 |
+
<form name="form1" method="post" action="admin.php?page=facebook-button-plugin.php" enctype="multipart/form-data" >
|
228 |
+
<table class="form-table">
|
229 |
+
<tr valign="top">
|
230 |
+
<th scope="row"><?php _e( "Your's FaceBook Id:", 'facebook' ); ?></th>
|
231 |
+
<td>
|
232 |
+
<input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] ?>' style="width:200px;" />
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
<tr valign="top">
|
236 |
+
<th scope="row"><?php _e( "Display button:", 'facebook' ); ?></th>
|
237 |
+
<td>
|
238 |
+
<input name='fcbk_bttn_plgn_my_page' type='checkbox' value='1' <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) echo 'checked="checked "'; ?>/> <label for="fcbk_bttn_plgn_my_page"><?php echo __( "My Page", 'captcha' ); ?></label><br />
|
239 |
+
<input name='fcbk_bttn_plgn_like' type='checkbox' value='1' <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) echo 'checked="checked "'; ?>/> <label for="fcbk_bttn_plgn_like"><?php echo __( "Like", 'captcha' ); ?></label><br />
|
240 |
+
</td>
|
241 |
+
</tr>
|
242 |
+
<tr>
|
243 |
+
<th>
|
244 |
+
<?php echo __( "Choose display option:", 'facebook' ); ?>
|
245 |
+
</th>
|
246 |
+
<td>
|
247 |
+
<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;" >
|
248 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ) echo 'selected="selected"'; ?> value="standart"><?php echo __( "Standart FaceBook image", 'facebook' ); ?></option>
|
249 |
+
<?php if( $copy || $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) { ?>
|
250 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) echo 'selected="selected"'; ?> value="custom"><?php echo __( "Custom FaceBook image", 'facebook' ); ?></option>
|
251 |
+
<?php } ?>
|
252 |
+
</select>
|
253 |
+
</td>
|
254 |
+
</tr>
|
255 |
+
<tr>
|
256 |
+
<th>
|
257 |
+
<?php echo __( "Current image:", 'facebook' ); ?>
|
258 |
+
</th>
|
259 |
+
<td>
|
260 |
+
<img src="<?php echo $fcbk_bttn_plgn_options_array [ 'fb_img_link' ]; ?>" style="margin-left:2px;" />
|
261 |
+
</td>
|
262 |
+
</tr>
|
263 |
+
<tr>
|
264 |
+
<td colspan="2">
|
265 |
+
<div id="fcbk_bttn_plgn_display_option_custom" <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) { echo ( 'style="display:block"' ); } else {echo ( 'style="display:none"' ); }?>>
|
266 |
+
<table>
|
267 |
+
<th style="padding-left:0px;font-size:13px;">
|
268 |
+
<input type="hidden" name="MAX_FILE_SIZE" value="64000"/>
|
269 |
+
<input type="hidden" name="home" value="<?php echo ABSPATH ; ?>"/>
|
270 |
+
<?php echo __( "FaceBook image:", 'facebook' ); ?>
|
271 |
+
</th>
|
272 |
+
<td>
|
273 |
+
<input name="uploadfile" type="file" style="width:196px;" /><br />
|
274 |
+
<span style="color: rgb(136, 136, 136); font-size: 10px;"><?php echo __( 'Image properties: max image width:100px; max image height:40px; max image size:32Kb; image types:"jpg", "jpeg".', 'facebook' ); ?></span>
|
275 |
+
</td>
|
276 |
+
</table>
|
277 |
+
</div>
|
278 |
+
</td>
|
279 |
+
</tr>
|
280 |
+
<tr>
|
281 |
+
<th>
|
282 |
+
<?php echo __( "FaceBook Button Position:", 'facebook' ); ?>
|
283 |
+
</th>
|
284 |
+
<td>
|
285 |
+
<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;" >
|
286 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'before' ) echo 'selected="selected"'; ?> value="before"><?php echo __( "Before", 'facebook' ); ?></option>
|
287 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'after' ) echo 'selected="selected"'; ?> value="after"><?php echo __( "After", 'facebook' ); ?></option>
|
288 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'beforeandafter' ) echo 'selected="selected"'; ?> value="beforeandafter"><?php echo __( "Before and After", 'facebook' ); ?></option>
|
289 |
+
<option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'shortcode') echo 'selected="selected"'; ?> value="shortcode"><?php echo __( "Shortcode", 'facebook' ); ?></option>
|
290 |
+
</select>
|
291 |
+
<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 put this shortcode onto your post or page:", 'facebook' ); ?> [fb_button].</span>
|
292 |
+
</td>
|
293 |
+
</tr>
|
294 |
+
<tr>
|
295 |
+
<th>
|
296 |
+
<?php echo __( "FaceBook Button language:", 'facebook' ); ?>
|
297 |
+
</th>
|
298 |
+
<td>
|
299 |
+
<select name="fcbk_bttn_plgn_locale">
|
300 |
+
<option value="af_ZA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "af_ZA" ) echo 'selected="selected"'; ?>>Afrikaans</option>
|
301 |
+
<option value="ar_AR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ar_AR" ) echo 'selected="selected"'; ?>>العربية</option>
|
302 |
+
<option value="ay_BO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ay_BO" ) echo 'selected="selected"'; ?>>Aymar aru</option>
|
303 |
+
<option value="az_AZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "az_AZ" ) echo 'selected="selected"'; ?>>Azərbaycan dili</option>
|
304 |
+
<option value="be_BY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "be_BY" ) echo 'selected="selected"'; ?>>Беларуская</option>
|
305 |
+
<option value="bg_BG" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bg_BG" ) echo 'selected="selected"'; ?>>Български</option>
|
306 |
+
<option value="bn_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bn_IN" ) echo 'selected="selected"'; ?>>বাংলা</option>
|
307 |
+
<option value="bs_BA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "bs_BA" ) echo 'selected="selected"'; ?>>Bosanski</option>
|
308 |
+
<option value="ca_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ca_ES" ) echo 'selected="selected"'; ?>>Català</option>
|
309 |
+
<option value="ck_US" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ck_US" ) echo 'selected="selected"'; ?>>Cherokee</option>
|
310 |
+
<option value="cs_CZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "cs_CZ" ) echo 'selected="selected"'; ?>>Čeština</option>
|
311 |
+
<option value="cy_GB" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "cy_GB" ) echo 'selected="selected"'; ?>>Cymraeg</option>
|
312 |
+
<option value="da_DK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "da_DK" ) echo 'selected="selected"'; ?>>Dansk</option>
|
313 |
+
<option value="de_DE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "de_DE" ) echo 'selected="selected"'; ?>>Deutsch</option>
|
314 |
+
<option value="el_GR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "el_GR" ) echo 'selected="selected"'; ?>>Ελληνικά</option>
|
315 |
+
<option value="en_US" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "en_US" ) echo 'selected="selected"'; ?>>English</option>
|
316 |
+
<option value="en_PI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "en_PI" ) echo 'selected="selected"'; ?>>English (Pirate)</option>
|
317 |
+
<option value="eo_EO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "eo_EO" ) echo 'selected="selected"'; ?>>Esperanto</option>
|
318 |
+
<option value="es_CL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_CL" ) echo 'selected="selected"'; ?>>Español (Chile)</option>
|
319 |
+
<option value="es_CO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_CO" ) echo 'selected="selected"'; ?>>Español (Colombia)</option>
|
320 |
+
<option value="es_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_ES" ) echo 'selected="selected"'; ?>>Español (España)</option>
|
321 |
+
<option value="es_LA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_LA" ) echo 'selected="selected"'; ?>>Español</option>
|
322 |
+
<option value="es_MX" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_MX" ) echo 'selected="selected"'; ?>>Español (México)</option>
|
323 |
+
<option value="es_VE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "es_VE" ) echo 'selected="selected"'; ?>>Español (Venezuela)</option>
|
324 |
+
<option value="et_EE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "et_EE" ) echo 'selected="selected"'; ?>>Eesti</option>
|
325 |
+
<option value="eu_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "eu_ES" ) echo 'selected="selected"'; ?>>Euskara</option>
|
326 |
+
<option value="fa_IR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fa_IR" ) echo 'selected="selected"'; ?>>فارسی</option>
|
327 |
+
<option value="fb_LT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fb_LT" ) echo 'selected="selected"'; ?>>Leet Speak</option>
|
328 |
+
<option value="fi_FI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fi_FI" ) echo 'selected="selected"'; ?>>Suomi</option>
|
329 |
+
<option value="fo_FO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fo_FO" ) echo 'selected="selected"'; ?>>Føroyskt</option>
|
330 |
+
<option value="fr_CA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fr_CA" ) echo 'selected="selected"'; ?>>Français (Canada)</option>
|
331 |
+
<option value="fr_FR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fr_FR" ) echo 'selected="selected"'; ?>>Français (France)</option>
|
332 |
+
<option value="fy_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "fy_NL" ) echo 'selected="selected"'; ?>>Frysk</option>
|
333 |
+
<option value="ga_IE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ga_IE" ) echo 'selected="selected"'; ?>>Gaeilge</option>
|
334 |
+
<option value="gl_ES" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gl_ES" ) echo 'selected="selected"'; ?>>Galego</option>
|
335 |
+
<option value="gn_PY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gn_PY" ) echo 'selected="selected"'; ?>>Avañe'ẽ</option>
|
336 |
+
<option value="gu_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gu_IN" ) echo 'selected="selected"'; ?>>ગુજરાતી</option>
|
337 |
+
<option value="gx_GR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "gx_GR" ) echo 'selected="selected"'; ?>>Ἑλληνική ἀρχαία</option>
|
338 |
+
<option value="he_IL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "he_IL" ) echo 'selected="selected"'; ?>>עברית</option>
|
339 |
+
<option value="hi_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hi_IN" ) echo 'selected="selected"'; ?>>हिन्दी</option>
|
340 |
+
<option value="hr_HR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hr_HR" ) echo 'selected="selected"'; ?>>Hrvatski</option>
|
341 |
+
<option value="hu_HU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hu_HU" ) echo 'selected="selected"'; ?>>Magyar</option>
|
342 |
+
<option value="hy_AM" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "hy_AM" ) echo 'selected="selected"'; ?>>Հայերեն</option>
|
343 |
+
<option value="id_ID" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "id_ID" ) echo 'selected="selected"'; ?>>Bahasa Indonesia</option>
|
344 |
+
<option value="is_IS" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "is_IS" ) echo 'selected="selected"'; ?>>Íslenska</option>
|
345 |
+
<option value="it_IT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "it_IT" ) echo 'selected="selected"'; ?>>Italiano</option>
|
346 |
+
<option value="ja_JP" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ja_JP" ) echo 'selected="selected"'; ?>>日本語</option>
|
347 |
+
<option value="jv_ID" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "jv_ID" ) echo 'selected="selected"'; ?>>Basa Jawa</option>
|
348 |
+
<option value="ka_GE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ka_GE" ) echo 'selected="selected"'; ?>>ქართული</option>
|
349 |
+
<option value="kk_KZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "kk_KZ" ) echo 'selected="selected"'; ?>>Қазақша</option>
|
350 |
+
<option value="km_KH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "km_KH" ) echo 'selected="selected"'; ?>>ភាសាខ្មែរ</option>
|
351 |
+
<option value="kn_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "kn_IN" ) echo 'selected="selected"'; ?>>ಕನ್ನಡ</option>
|
352 |
+
<option value="ko_KR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ko_KR" ) echo 'selected="selected"'; ?>>한국어</option>
|
353 |
+
<option value="ku_TR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ku_TR" ) echo 'selected="selected"'; ?>>Kurdî</option>
|
354 |
+
<option value="la_VA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "la_VA" ) echo 'selected="selected"'; ?>>lingua latina</option>
|
355 |
+
<option value="li_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "li_NL" ) echo 'selected="selected"'; ?>>Limburgs</option>
|
356 |
+
<option value="lt_LT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "lt_LT" ) echo 'selected="selected"'; ?>>Lietuvių</option>
|
357 |
+
<option value="lv_LV" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "lv_LV" ) echo 'selected="selected"'; ?>>Latviešu</option>
|
358 |
+
<option value="mg_MG" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mg_MG" ) echo 'selected="selected"'; ?>>Malagasy</option>
|
359 |
+
<option value="mk_MK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mk_MK" ) echo 'selected="selected"'; ?>>Македонски</option>
|
360 |
+
<option value="ml_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ml_IN" ) echo 'selected="selected"'; ?>>മലയാളം</option>
|
361 |
+
<option value="mn_MN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mn_MN" ) echo 'selected="selected"'; ?>>Монгол</option>
|
362 |
+
<option value="mr_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mr_IN" ) echo 'selected="selected"'; ?>>मराठी</option>
|
363 |
+
<option value="ms_MY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ms_MY" ) echo 'selected="selected"'; ?>>Bahasa Melayu</option>
|
364 |
+
<option value="mt_MT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "mt_MT" ) echo 'selected="selected"'; ?>>Malti</option>
|
365 |
+
<option value="nb_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nb_NO" ) echo 'selected="selected"'; ?>>Norsk (bokmål)</option>
|
366 |
+
<option value="ne_NP" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ne_NP" ) echo 'selected="selected"'; ?>>नेपाली</option>
|
367 |
+
<option value="nl_BE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nl_BE" ) echo 'selected="selected"'; ?>>Nederlands (België)</option>
|
368 |
+
<option value="nl_NL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nl_NL" ) echo 'selected="selected"'; ?>>Nederlands</option>
|
369 |
+
<option value="nn_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "nn_NO" ) echo 'selected="selected"'; ?>>Norsk (nynorsk)</option>
|
370 |
+
<option value="pa_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pa_IN" ) echo 'selected="selected"'; ?>>ਪੰਜਾਬੀ</option>
|
371 |
+
<option value="pl_PL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pl_PL" ) echo 'selected="selected"'; ?>>Polski</option>
|
372 |
+
<option value="ps_AF" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ps_AF" ) echo 'selected="selected"'; ?>>پښتو</option>
|
373 |
+
<option value="pt_BR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pt_BR" ) echo 'selected="selected"'; ?>>Português (Brasil)</option>
|
374 |
+
<option value="pt_PT" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "pt_PT" ) echo 'selected="selected"'; ?>>Português (Portugal)</option>
|
375 |
+
<option value="qu_PE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "qu_PE" ) echo 'selected="selected"'; ?>>Qhichwa</option>
|
376 |
+
<option value="rm_CH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "rm_CH" ) echo 'selected="selected"'; ?>>Rumantsch</option>
|
377 |
+
<option value="ro_RO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ro_RO" ) echo 'selected="selected"'; ?>>Română</option>
|
378 |
+
<option value="ru_RU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ru_RU" ) echo 'selected="selected"'; ?>>Русский</option>
|
379 |
+
<option value="sa_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sa_IN" ) echo 'selected="selected"'; ?>>संस्कृतम्</option>
|
380 |
+
<option value="se_NO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "se_NO" ) echo 'selected="selected"'; ?>>Davvisámegiella</option>
|
381 |
+
<option value="sk_SK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sk_SK" ) echo 'selected="selected"'; ?>>Slovenčina</option>
|
382 |
+
<option value="sl_SI" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sl_SI" ) echo 'selected="selected"'; ?>>Slovenščina</option>
|
383 |
+
<option value="so_SO" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "so_SO" ) echo 'selected="selected"'; ?>>Soomaaliga</option>
|
384 |
+
<option value="sq_AL" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sq_AL" ) echo 'selected="selected"'; ?>>Shqip</option>
|
385 |
+
<option value="sr_RS" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sr_RS" ) echo 'selected="selected"'; ?>>Српски</option>
|
386 |
+
<option value="sv_SE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sv_SE" ) echo 'selected="selected"'; ?>>Svenska</option>
|
387 |
+
<option value="sw_KE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sw_KE" ) echo 'selected="selected"'; ?>>Kiswahili</option>
|
388 |
+
<option value="sy_SY" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "sy_SY" ) echo 'selected="selected"'; ?>>ܐܪܡܝܐ</option>
|
389 |
+
<option value="ta_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ta_IN" ) echo 'selected="selected"'; ?>>தமிழ்</option>
|
390 |
+
<option value="te_IN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "te_IN" ) echo 'selected="selected"'; ?>>తెలుగు</option>
|
391 |
+
<option value="tg_TJ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tg_TJ" ) echo 'selected="selected"'; ?>>тоҷикӣ</option>
|
392 |
+
<option value="th_TH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "th_TH" ) echo 'selected="selected"'; ?>>ภาษาไทย</option>
|
393 |
+
<option value="tl_PH" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tl_PH" ) echo 'selected="selected"'; ?>>Filipino</option>
|
394 |
+
<option value="tl_ST" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tl_ST" ) echo 'selected="selected"'; ?>>tlhIngan-Hol</option>
|
395 |
+
<option value="tr_TR" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tr_TR" ) echo 'selected="selected"'; ?>>Türkçe</option>
|
396 |
+
<option value="tt_RU" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "tt_RU" ) echo 'selected="selected"'; ?>>Татарча</option>
|
397 |
+
<option value="uk_UA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "uk_UA" ) echo 'selected="selected"'; ?>>Українська</option>
|
398 |
+
<option value="ur_PK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "ur_PK" ) echo 'selected="selected"'; ?>>اردو</option>
|
399 |
+
<option value="uz_UZ" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "uz_UZ" ) echo 'selected="selected"'; ?>>O'zbek</option>
|
400 |
+
<option value="vi_VN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "vi_VN" ) echo 'selected="selected"'; ?>>Tiếng Việt</option>
|
401 |
+
<option value="yi_DE" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "yi_DE" ) echo 'selected="selected"'; ?>>ייִדיש</option>
|
402 |
+
<option value="zh_CN" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_CN" ) echo 'selected="selected"'; ?>>中文(简体)</option>
|
403 |
+
<option value="zh_HK" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_HK" ) echo 'selected="selected"'; ?>>中文(香港)</option>
|
404 |
+
<option value="zh_TW" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zh_TW" ) echo 'selected="selected"'; ?>>中文(台灣)</option>
|
405 |
+
<option value="zu_ZA" <?php if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ] == "zu_ZA" ) echo 'selected="selected"'; ?>>isiZulu</option>
|
406 |
+
</select>
|
407 |
+
<span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; display:inline"><?php echo __( "Select language for Like button", 'facebook' ); ?></span>
|
408 |
+
</td>
|
409 |
+
</tr>
|
410 |
+
<tr>
|
411 |
+
<td colspan="2">
|
412 |
+
<input type="hidden" name="fcbk_bttn_plgn_form_submit" value="submit" />
|
413 |
+
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
414 |
+
</td>
|
415 |
+
</tr>
|
416 |
+
</table>
|
417 |
+
<?php wp_nonce_field( plugin_basename(__FILE__), 'fcbk_bttn_plgn_nonce_name' ); ?>
|
418 |
+
</form>
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
|
422 |
+
<?php
|
423 |
+
}
|
424 |
+
}
|
425 |
+
|
426 |
+
//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'
|
427 |
+
if( ! function_exists( 'fcbk_bttn_plgn_update_option' ) ) {
|
428 |
+
function fcbk_bttn_plgn_update_option () {
|
429 |
+
global $fcbk_bttn_plgn_options_array;
|
430 |
+
if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ){
|
431 |
+
$fb_img_link = plugins_url( 'img/standart-facebook-ico.jpg', __FILE__ );
|
432 |
+
} else if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom'){
|
433 |
+
$fb_img_link = plugins_url( 'img/facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ].'.jpg', __FILE__ );
|
434 |
+
}
|
435 |
+
$fcbk_bttn_plgn_options_array [ 'fb_img_link' ] = $fb_img_link ;
|
436 |
+
update_option( "fcbk_bttn_plgn_options_array", $fcbk_bttn_plgn_options_array );
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
//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.
|
441 |
+
if( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
|
442 |
+
function fcbk_bttn_plgn_display_button ( $content ) {
|
443 |
+
global $post;
|
444 |
+
//Query the database to receive array 'fcbk_bttn_plgn_options_array' and receiving necessary information to create button
|
445 |
+
$fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
|
446 |
+
$fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
|
447 |
+
$img = $fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
|
448 |
+
$url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
|
449 |
+
$permalink_post = get_permalink ( $post->ID );
|
450 |
+
//Button
|
451 |
+
$button = '<div id="fcbk_share">';
|
452 |
+
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) {
|
453 |
+
$button .= '<div class="fcbk_button">
|
454 |
+
<a name="fcbk_share" href="http://www.facebook.com/' . $url . '" target="blank">
|
455 |
+
<img src="' . $img . '" alt="Fb-Button" />
|
456 |
+
</a>
|
457 |
+
</div>';
|
458 |
+
}
|
459 |
+
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) {
|
460 |
+
$button .= '<div class="fcbk_like">
|
461 |
+
<div id="fb-root"></div>
|
462 |
+
<script src="http://connect.facebook.net/'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_locale' ].'/all.js#appId=224313110927811&xfbml=1"></script>
|
463 |
+
<fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
|
464 |
+
</div>';
|
465 |
+
}
|
466 |
+
|
467 |
+
$button .= '</div>';
|
468 |
+
//Indication where show FaceBook Button depending on selected item in admin page.
|
469 |
+
if ( $fcbk_bttn_plgn_where == 'before' ) {
|
470 |
+
return $button . $content;
|
471 |
+
} else if ( $fcbk_bttn_plgn_where == 'after' ) {
|
472 |
+
return $content . $button;
|
473 |
+
} else if ( $fcbk_bttn_plgn_where == 'beforeandafter' ) {
|
474 |
+
return $button . $content . $button;
|
475 |
+
} else if ( $fcbk_bttn_plgn_where == 'shortcode' ) {
|
476 |
+
return $content;
|
477 |
+
} else {
|
478 |
+
return $content;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
}
|
482 |
+
|
483 |
+
//Function 'fcbk_bttn_plgn_shortcode' are using to create shortcode by FaceBook Button.
|
484 |
+
if( ! function_exists( 'fcbk_bttn_plgn_shortcode' ) ) {
|
485 |
+
function fcbk_bttn_plgn_shortcode( $content ) {
|
486 |
+
$fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
|
487 |
+
$fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
|
488 |
+
$img = $fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
|
489 |
+
$url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
|
490 |
+
$permalink_post = get_permalink ( $post_ID );
|
491 |
+
$button = '<div id="fcbk_share">';
|
492 |
+
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_my_page' ] == 1 ) {
|
493 |
+
$button .= '<div class="fcbk_button">
|
494 |
+
<a name="fcbk_share" href="http://www.facebook.com/' . $url . '" target="blank">
|
495 |
+
<img src="' . $img . '" alt="Fb-Button" />
|
496 |
+
</a>
|
497 |
+
</div>';
|
498 |
+
}
|
499 |
+
if( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_like' ] == 1 ) {
|
500 |
+
$button .= '<div class="fcbk_like">
|
501 |
+
<div id="fb-root"></div>
|
502 |
+
<script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&xfbml=1"></script>
|
503 |
+
<fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
|
504 |
+
</div>';
|
505 |
+
}
|
506 |
+
|
507 |
+
$button .= '</div>';
|
508 |
+
return $button;
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
//Function 'fcbk_bttn_plgn_action_links' are using to create action links on admin page.
|
513 |
+
if( ! function_exists( 'fcbk_bttn_plgn_action_links' ) ) {
|
514 |
+
function fcbk_bttn_plgn_action_links( $links, $file ) {
|
515 |
+
//Static so we don't call plugin_basename on every plugin row.
|
516 |
+
static $this_plugin;
|
517 |
+
if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
|
518 |
+
|
519 |
+
if ( $file == $this_plugin ){
|
520 |
+
$settings_link = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings', 'facebook' ) . '</a>';
|
521 |
+
array_unshift( $links, $settings_link );
|
522 |
+
}
|
523 |
+
return $links;
|
524 |
+
}
|
525 |
+
} // end function fcbk_bttn_plgn_action_links
|
526 |
+
|
527 |
+
//Function 'fcbk_bttn_plgn_links' are using to create other links on admin page.
|
528 |
+
if ( ! function_exists ( 'fcbk_bttn_plgn_links' ) ) {
|
529 |
+
function fcbk_bttn_plgn_links($links, $file) {
|
530 |
+
$base = plugin_basename(__FILE__);
|
531 |
+
if ($file == $base) {
|
532 |
+
$links[] = '<a href="admin.php?page=facebook-button-plugin.php">' . __( 'Settings','facebook' ) . '</a>';
|
533 |
+
$links[] = '<a href="http://wordpress.org/extend/plugins/facebook-button-plugin/faq/" target="_blank">' . __( 'FAQ','facebook' ) . '</a>';
|
534 |
+
$links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __( 'Support','facebook' ) . '</a>';
|
535 |
+
}
|
536 |
+
return $links;
|
537 |
+
}
|
538 |
+
} // end function fcbk_bttn_plgn_links
|
539 |
+
|
540 |
+
//Function '_plugin_init' are using to add language files.
|
541 |
+
if ( ! function_exists ( 'fcbk_plugin_init' ) ) {
|
542 |
+
function fcbk_plugin_init() {
|
543 |
+
load_plugin_textdomain( 'facebook', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
544 |
+
}
|
545 |
+
} // end function fcbk_plugin_init
|
546 |
+
|
547 |
+
|
548 |
+
if ( ! function_exists ( 'fcbk_admin_head' ) ) {
|
549 |
+
function fcbk_admin_head() {
|
550 |
+
wp_register_style( 'fcbkStylesheet', plugins_url( 'css/style.css', __FILE__ ) );
|
551 |
+
wp_enqueue_style( 'fcbkStylesheet' );
|
552 |
+
}
|
553 |
+
}
|
554 |
+
|
555 |
+
//Add language files
|
556 |
+
add_action( 'init', 'fcbk_plugin_init' );
|
557 |
+
|
558 |
+
add_action( 'wp_enqueue_scripts', 'fcbk_admin_head' );
|
559 |
+
add_action( 'admin_enqueue_scripts', 'fcbk_admin_head' );
|
560 |
+
|
561 |
+
// adds "Settings" link to the plugin action page
|
562 |
+
add_filter( 'plugin_action_links', 'fcbk_bttn_plgn_action_links', 10, 2 );
|
563 |
+
|
564 |
+
//Additional links on the plugin page
|
565 |
+
add_filter( 'plugin_row_meta', 'fcbk_bttn_plgn_links', 10, 2 );
|
566 |
+
|
567 |
+
//Calling a function add administrative menu.
|
568 |
+
add_action( 'admin_menu', 'fcbk_bttn_plgn_add_pages' );
|
569 |
+
|
570 |
+
//Add shortcode.
|
571 |
+
add_shortcode( 'fb_button', 'fcbk_bttn_plgn_shortcode' );
|
572 |
+
|
573 |
+
//Add settings links.
|
574 |
+
add_filter( 'the_content', 'fcbk_bttn_plgn_display_button' );
|
575 |
+
|
languages/facebook-uk.mo
ADDED
Binary file
|
languages/facebook-uk.po
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: facebook\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2013-03-04 09:51+0300\n"
|
6 |
+
"PO-Revision-Date: 2013-03-04 09:54+0300\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: Cmd Soft <tmosbyd@gmail.com>\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Language: ua_UA\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"X-Generator: Poedit 1.5.5\n"
|
17 |
+
"X-Poedit-SearchPath-0: .\n"
|
18 |
+
|
19 |
+
#: facebook-button-plugin.php:79
|
20 |
+
msgid "Activated plugins"
|
21 |
+
msgstr "Активоване плагіни"
|
22 |
+
|
23 |
+
#: facebook-button-plugin.php:81
|
24 |
+
#: facebook-button-plugin.php:89
|
25 |
+
#: facebook-button-plugin.php:97
|
26 |
+
msgid "Read more"
|
27 |
+
msgstr "Читати далі"
|
28 |
+
|
29 |
+
#: facebook-button-plugin.php:81
|
30 |
+
#: facebook-button-plugin.php:520
|
31 |
+
#: facebook-button-plugin.php:532
|
32 |
+
msgid "Settings"
|
33 |
+
msgstr "Налаштування"
|
34 |
+
|
35 |
+
#: facebook-button-plugin.php:87
|
36 |
+
msgid "Installed plugins"
|
37 |
+
msgstr "Встановлені плагіни"
|
38 |
+
|
39 |
+
#: facebook-button-plugin.php:95
|
40 |
+
msgid "Recommended plugins"
|
41 |
+
msgstr "Рекомендовані плагіни"
|
42 |
+
|
43 |
+
#: facebook-button-plugin.php:97
|
44 |
+
msgid "Download"
|
45 |
+
msgstr "Завантажити"
|
46 |
+
|
47 |
+
#: facebook-button-plugin.php:97
|
48 |
+
#, php-format
|
49 |
+
msgid "Install %s"
|
50 |
+
msgstr "Встановіть %s"
|
51 |
+
|
52 |
+
#: facebook-button-plugin.php:97
|
53 |
+
msgid "Install now from wordpress.org"
|
54 |
+
msgstr "Встановити зараз від wordpress.org"
|
55 |
+
|
56 |
+
#: facebook-button-plugin.php:99
|
57 |
+
msgid "If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site"
|
58 |
+
msgstr "Якщо у Вас виникли питання, будь ласка, зв'яжіться з нами через plugin@bestwebsoft.com або заповнити контактну форму на нашому сайті"
|
59 |
+
|
60 |
+
#: facebook-button-plugin.php:110
|
61 |
+
#: facebook-button-plugin.php:223
|
62 |
+
msgid "FaceBook Button Options"
|
63 |
+
msgstr "FaceBook кнопку Параметри"
|
64 |
+
|
65 |
+
#: facebook-button-plugin.php:110
|
66 |
+
msgid "FaceBook Button"
|
67 |
+
msgstr "FaceBook кнопка"
|
68 |
+
|
69 |
+
#: facebook-button-plugin.php:170
|
70 |
+
msgid "Options saved."
|
71 |
+
msgstr "Налаштування збережені."
|
72 |
+
|
73 |
+
#: facebook-button-plugin.php:192
|
74 |
+
msgid "Error: File size > 32K"
|
75 |
+
msgstr "Помилка: Розмір файлу> 32K"
|
76 |
+
|
77 |
+
#: facebook-button-plugin.php:195
|
78 |
+
msgid "Error: Invalid file type"
|
79 |
+
msgstr "Помилка: Невірний тип файлу"
|
80 |
+
|
81 |
+
#: facebook-button-plugin.php:205
|
82 |
+
msgid "Error: moving file failed"
|
83 |
+
msgstr "Помилка: не вдалося Переміщення файлів"
|
84 |
+
|
85 |
+
#: facebook-button-plugin.php:209
|
86 |
+
msgid "Error: check image width or height"
|
87 |
+
msgstr "Помилка: Перевірка ширини або висоти зображень"
|
88 |
+
|
89 |
+
#: facebook-button-plugin.php:214
|
90 |
+
msgid "Uploading Error: check image properties"
|
91 |
+
msgstr "Завантаження Помилка: Перевірка властивостей зображення"
|
92 |
+
|
93 |
+
#: facebook-button-plugin.php:230
|
94 |
+
msgid "Your's FaceBook Id:"
|
95 |
+
msgstr "Ваша автора FaceBook Id:"
|
96 |
+
|
97 |
+
#: facebook-button-plugin.php:236
|
98 |
+
msgid "Display button:"
|
99 |
+
msgstr "Відображення кнопки:"
|
100 |
+
|
101 |
+
#: facebook-button-plugin.php:238
|
102 |
+
msgid "My Page"
|
103 |
+
msgstr "Моя сторінка"
|
104 |
+
|
105 |
+
#: facebook-button-plugin.php:239
|
106 |
+
msgid "Like"
|
107 |
+
msgstr "подобатися "
|
108 |
+
|
109 |
+
#: facebook-button-plugin.php:244
|
110 |
+
msgid "Choose display option:"
|
111 |
+
msgstr "Виберіть опцію відображення:"
|
112 |
+
|
113 |
+
#: facebook-button-plugin.php:248
|
114 |
+
msgid "Standart FaceBook image"
|
115 |
+
msgstr "Стандарт FaceBook зображення"
|
116 |
+
|
117 |
+
#: facebook-button-plugin.php:250
|
118 |
+
msgid "Custom FaceBook image"
|
119 |
+
msgstr "Користувальницькі FaceBook зображення"
|
120 |
+
|
121 |
+
#: facebook-button-plugin.php:257
|
122 |
+
msgid "Current image:"
|
123 |
+
msgstr "Поточне зображення:"
|
124 |
+
|
125 |
+
#: facebook-button-plugin.php:270
|
126 |
+
msgid "FaceBook image:"
|
127 |
+
msgstr "FaceBook зображення:"
|
128 |
+
|
129 |
+
#: facebook-button-plugin.php:274
|
130 |
+
msgid "Image properties: max image width:100px; max image height:40px; max image size:32Kb; image types:\"jpg\", \"jpeg\"."
|
131 |
+
msgstr "Властивості: максимальна ширина зображення:100px; Максимальна висота зображення:40px; максимальний розмір зображення:32Kb; Зображення типів:\"jpg\", \"jpeg\"."
|
132 |
+
|
133 |
+
#: facebook-button-plugin.php:282
|
134 |
+
msgid "FaceBook Button Position:"
|
135 |
+
msgstr "Кнопка FaceBook Статус:"
|
136 |
+
|
137 |
+
#: facebook-button-plugin.php:286
|
138 |
+
msgid "Before"
|
139 |
+
msgstr "Перш ніж"
|
140 |
+
|
141 |
+
#: facebook-button-plugin.php:287
|
142 |
+
msgid "After"
|
143 |
+
msgstr "Після того як"
|
144 |
+
|
145 |
+
#: facebook-button-plugin.php:288
|
146 |
+
msgid "Before and After"
|
147 |
+
msgstr "До і після"
|
148 |
+
|
149 |
+
#: facebook-button-plugin.php:289
|
150 |
+
msgid "Shortcode"
|
151 |
+
msgstr "Шорткода"
|
152 |
+
|
153 |
+
#: facebook-button-plugin.php:291
|
154 |
+
msgid "If you would like to add a FaceBook button to your website, just copy and put this shortcode onto your post or page:"
|
155 |
+
msgstr "Якщо ви хочете додати кнопку FaceBook на ваш сайт, просто скопіювати і помістити цей короткий на ваш пост або сторінку:"
|
156 |
+
|
157 |
+
#: facebook-button-plugin.php:296
|
158 |
+
msgid "FaceBook Button language:"
|
159 |
+
msgstr "Кнопка FaceBook мову:"
|
160 |
+
|
161 |
+
#: facebook-button-plugin.php:407
|
162 |
+
msgid "Select language for Like button"
|
163 |
+
msgstr "Виберіть мову для кнопки Like"
|
164 |
+
|
165 |
+
#: facebook-button-plugin.php:413
|
166 |
+
msgid "Save Changes"
|
167 |
+
msgstr "Зберегти зміни"
|
168 |
+
|
169 |
+
#: facebook-button-plugin.php:533
|
170 |
+
msgid "FAQ"
|
171 |
+
msgstr "Часті питання"
|
172 |
+
|
173 |
+
#: facebook-button-plugin.php:534
|
174 |
+
msgid "Support"
|
175 |
+
msgstr "Підтримка"
|
176 |
+
|
177 |
+
#~ msgid "Install Now"
|
178 |
+
#~ msgstr "Установить сейчас"
|
179 |
+
#~ msgid "BWS Plugins"
|
180 |
+
#~ msgstr "Плагины BWS"
|
181 |
+
|
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: 2.9
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -33,6 +33,7 @@ Facebook Button Plugin allows you to add follow button in the most easiest and f
|
|
33 |
* Serbian (sr_RS) (thanks to Georgijevic Team, www.georgijevic.info)
|
34 |
* Spanish (es_ES) (thanks to Jesús Parra)
|
35 |
* Turkish (tr_TR) (thanks to Can Atasever, <a href="http://www.candanblog.com">www.candanblog.com</a>)
|
|
|
36 |
|
37 |
If you create your own language pack or update an existing one, you can send <a href="http://codex.wordpress.org/Translating_WordPress" target="_blank"> text in PO and MO files</a> for <a href="http://bestwebsoft.com/" target="_blank">BWS</a> and we'll add it to the plugin. You can download the latest version of the program for work with PO and MO files <a href="http://www.poedit.net/download.php" target="_blank">Poedit</a>.
|
38 |
|
@@ -85,6 +86,9 @@ Dear users, if you have any questions or propositions regarding our plugins (cur
|
|
85 |
|
86 |
== Changelog ==
|
87 |
|
|
|
|
|
|
|
88 |
= V2.16 - 01.03.2013 =
|
89 |
* Update : We updated CSS file.
|
90 |
* Update : We updated all functionality for wordpress 3.5.1.
|
@@ -150,6 +154,9 @@ Dear users, if you have any questions or propositions regarding our plugins (cur
|
|
150 |
|
151 |
== Upgrade Notice ==
|
152 |
|
|
|
|
|
|
|
153 |
= V2.16 =
|
154 |
We updated CSS file. We updated all functionality for wordpress 3.5.1.
|
155 |
|
@@ -199,4 +206,4 @@ The bug of adjustment the link to the page is fixed in this version. Please upgr
|
|
199 |
Usability at the settings page of the plugin was improved.
|
200 |
|
201 |
= V1 =
|
202 |
-
Ability to install Facebook Button icon with a link to the account page is created, including settings adjustment functionality via WordPress admin panel.
|
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: 2.9
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 2.17
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
33 |
* Serbian (sr_RS) (thanks to Georgijevic Team, www.georgijevic.info)
|
34 |
* Spanish (es_ES) (thanks to Jesús Parra)
|
35 |
* Turkish (tr_TR) (thanks to Can Atasever, <a href="http://www.candanblog.com">www.candanblog.com</a>)
|
36 |
+
* Ukrainian (uk) (thanks to <a href="http://www.cmd-soft.com">Cmd Soft</a>)
|
37 |
|
38 |
If you create your own language pack or update an existing one, you can send <a href="http://codex.wordpress.org/Translating_WordPress" target="_blank"> text in PO and MO files</a> for <a href="http://bestwebsoft.com/" target="_blank">BWS</a> and we'll add it to the plugin. You can download the latest version of the program for work with PO and MO files <a href="http://www.poedit.net/download.php" target="_blank">Poedit</a>.
|
39 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= V2.17 - 04.03.2013 =
|
90 |
+
* NEW : Ukrainian language file was added to the plugin.
|
91 |
+
|
92 |
= V2.16 - 01.03.2013 =
|
93 |
* Update : We updated CSS file.
|
94 |
* Update : We updated all functionality for wordpress 3.5.1.
|
154 |
|
155 |
== Upgrade Notice ==
|
156 |
|
157 |
+
= V2.17 =
|
158 |
+
Ukrainian language file was added to the plugin.
|
159 |
+
|
160 |
= V2.16 =
|
161 |
We updated CSS file. We updated all functionality for wordpress 3.5.1.
|
162 |
|
206 |
Usability at the settings page of the plugin was improved.
|
207 |
|
208 |
= V1 =
|
209 |
+
Ability to install Facebook Button icon with a link to the account page is created, including settings adjustment functionality via WordPress admin panel.
|