Easy Facebook Like Box (Facebook Page Plugin) – Custom Facebook Feed – Auto PopUp - Version 1.1.0

Version Description

  • Optional responsive like box option is added in this version
  • Multilingual support. Now you can display the like box in over 75 languages by simply selecting from drop down.
Download this release

Release Info

Developer sjaved
Plugin Icon 128x128 Easy Facebook Like Box (Facebook Page Plugin) – Custom Facebook Feed – Auto PopUp
Version 1.1.0
Comparing to
See all releases

Code changes from version 1.0.2 to 1.1.0

README.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Easy Facebook Like Box ===
2
  Contributors: sjaved
3
- Tags: facebook, facebook likebox, likebox, like box, facebook like box, facebook like box widget, facebook like box shortcode, shortcode, facebook like box plugin, facebook like box wordpress plugin, plugin
4
- Donate link: http://jwebsol.com/?track=donate
5
  Requires at least: 3.3
6
- Tested up to: 3.9
7
- Stable tag: 1.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ Easy facebook like box WordPress plugin allows you to display fan page posts, li
14
 
15
  Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website. Easy facebook like box display fan page posts, like button, and connections on your website using widget or shortcode.
16
 
17
- [Click for demo](http://jwebsol.com/easy-facebook-like-box-plugin-demo/ "See this plugin in action")
18
 
19
  **Options:**
20
 
@@ -22,6 +22,8 @@ Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enab
22
  1. Facebook Page URL - enter an URL address to the Facebook fan page
23
  1. Width - set the width of the module in pixels. The default width is 250px
24
  1. Height - With the stream displayed and 8 connections the default height is 556px. With no stream displayed and 8 connections the default height is 271px. With no connections and no stream the default height is 63px
 
 
25
  1. Color Scheme - choose the color scheme for the like box (light/dark)
26
  1. Show Faces - show/hide profile photos (1 for show and 0 for hide to use in shortcode)
27
  1. Stream - show/hide the latest wall posts (1 for show and 0 for hide to use in shortcode)
@@ -35,14 +37,16 @@ You can use easy facebook like box in number of ways:
35
  * Display facebook like box in sidebar using widget.
36
 
37
  * Display facebook like box in posts or pages using shortcode. Genraete shortcode using widget or add this shortcode and modify the values manually.
38
- `[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]`
39
 
40
  * Want to display in a template paste below code along with your optional settings.
41
- `<?php echo do_shortcode( '[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]' ); ?>`
42
 
43
  Features:
44
 
45
- 1. Extended optiontional settings to personalize in widget and shortcode
 
 
46
  1. Generate shortcode using widget form
47
  1. Likebox in PopUp (Modal window) and responsive likebox option is coming soon...
48
 
@@ -84,6 +88,11 @@ http://wordpress.org/support/topic/need-feed-back-on-plugin-feature/
84
 
85
  == Changelog ==
86
 
 
 
 
 
 
87
  = 1.0.2 =
88
 
89
  * Updated the plugin with instructions and major bug fix. Must update.
1
  === Easy Facebook Like Box ===
2
  Contributors: sjaved
3
+ Tags: facebook, facebook likebox, likebox, like box, facebook like box, facebook like box widget, facebook like box shortcode, shortcode, facebook like box plugin, facebook like box wordpress plugin, plugin, responsive facebook like box, responsive, facebook like box in 75 locales, facebook like box in 75 languages
4
+ Donate link: http://selz.co/1lw1sZ2
5
  Requires at least: 3.3
6
+ Tested up to: 3.9.1
7
+ Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  Displays a Facebook Like Box. The Facebook Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website. Easy facebook like box display fan page posts, like button, and connections on your website using widget or shortcode.
16
 
17
+ [Fixed width demo](http://jwebsol.com/easy-facebook-like-box-plugin-demo/ "See this plugin in action (Fixed width)") | [Responsive demo](http://jwebsol.com/easy-facebook-like-box-responsive-demo/ "See this plugin in action (Responsive)")
18
 
19
  **Options:**
20
 
22
  1. Facebook Page URL - enter an URL address to the Facebook fan page
23
  1. Width - set the width of the module in pixels. The default width is 250px
24
  1. Height - With the stream displayed and 8 connections the default height is 556px. With no stream displayed and 8 connections the default height is 271px. With no connections and no stream the default height is 63px
25
+ 1. Language/Locale - choose your locale for the like box from 75 languages
26
+ 1. Responsive - enable/disable responsive mode of like box (1 enalbe and 0 for disable to use in shortcode)
27
  1. Color Scheme - choose the color scheme for the like box (light/dark)
28
  1. Show Faces - show/hide profile photos (1 for show and 0 for hide to use in shortcode)
29
  1. Stream - show/hide the latest wall posts (1 for show and 0 for hide to use in shortcode)
37
  * Display facebook like box in sidebar using widget.
38
 
39
  * Display facebook like box in posts or pages using shortcode. Genraete shortcode using widget or add this shortcode and modify the values manually.
40
+ `[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" locale="NAME_OF_YOUR_LANGUAGE_LOCAE(default en_US)" responsive="RESPONSIVE_FOR_MOBILE(1/0)" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]`
41
 
42
  * Want to display in a template paste below code along with your optional settings.
43
+ `<?php echo do_shortcode( '[efb_likebox fanpage_url="YOUR_FB_FANPAGE_URL" fb_appid="OPTIONAL_SEE_FAQ" box_width="WIDTH_OF_BOX_IN_PIXELS" box_height="HEIGHT_OF_BOX_IN_PIXELS" locale="NAME_OF_YOUR_LANGUAGE_LOCAE(default en_US)" responsive="RESPONSIVE_FOR_MOBILE(1/0)" colorscheme="CHOSEN_COLOSCHEME(light/dark)" show_faces="SHOW_CONNECTIONS(1/0)" show_header="SHOW_HEADER(1/0)" show_stream="SHOW_STREAM_POSTS(1/0)" show_border="DISPLAY_BORDER(1/0)"]' ); ?>`
44
 
45
  Features:
46
 
47
+ 1. Now support optional **responsive** layout
48
+ 1. Support 75 different locales
49
+ 1. Extended optional settings to personalize in widget and shortcode
50
  1. Generate shortcode using widget form
51
  1. Likebox in PopUp (Modal window) and responsive likebox option is coming soon...
52
 
88
 
89
  == Changelog ==
90
 
91
+ = 1.1.0 =
92
+
93
+ * Optional responsive like box option is added in this version
94
+ * Multilingual support. Now you can display the like box in over 75 languages by simply selecting from drop down.
95
+
96
  = 1.0.2 =
97
 
98
  * Updated the plugin with instructions and major bug fix. Must update.
admin/assets/css/admin.css CHANGED
@@ -1 +1,13 @@
1
- /* This stylesheet is used to style the admin option form of the plugin. */
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This stylesheet is used to style the admin option form of the plugin. */
2
+
3
+ .widget-half {
4
+ width: 49%;
5
+ float: left;
6
+ margin-bottom: 0px;
7
+ }
8
+ .widget-half select{
9
+ width:95%;
10
+ }
11
+ .clearfix {
12
+ clear: both;
13
+ }
admin/easy-facebook-likebox-admin.php CHANGED
@@ -80,14 +80,7 @@ class Easy_Facebook_Likebox_Admin {
80
  $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_slug . '.php' );
81
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
82
 
83
- /*
84
- * Define custom functionality.
85
- *
86
- * Read more about actions and filters:
87
- * http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
88
- */
89
- add_action( '@TODO', array( $this, 'action_method_name' ) );
90
- add_filter( '@TODO', array( $this, 'filter_method_name' ) );
91
 
92
  }
93
 
@@ -130,14 +123,16 @@ class Easy_Facebook_Likebox_Admin {
130
  */
131
  public function enqueue_admin_styles() {
132
 
133
- if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
134
  return;
135
  }
136
 
137
  $screen = get_current_screen();
138
  if ( $this->plugin_screen_hook_suffix == $screen->id ) {
139
- wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), Easy_Facebook_Likebox::VERSION );
140
- }
 
 
141
 
142
  }
143
 
80
  $plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_slug . '.php' );
81
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'add_action_links' ) );
82
 
83
+
 
 
 
 
 
 
 
84
 
85
  }
86
 
123
  */
124
  public function enqueue_admin_styles() {
125
 
126
+ /*if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
127
  return;
128
  }
129
 
130
  $screen = get_current_screen();
131
  if ( $this->plugin_screen_hook_suffix == $screen->id ) {
132
+
133
+ }*/
134
+
135
+ wp_enqueue_style( $this->plugin_slug .'-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), Easy_Facebook_Likebox::VERSION );
136
 
137
  }
138
 
easy-facebook-likebox.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Easy Facebook Likebox
4
  * Plugin URI: httt://wordpress.org/plugins/easy-facebook-likebox
5
  * Description: Easy Facebook like box WordPress plugin allows you to easly display facebook like box fan page on your website using either widget or shortcode to increase facbook fan page likes. You can use the shortcode generated after saving the facebook like box widget. Its completely customizable with lots of optional settings. Its also responsive facebook like box at the same time.
6
- * Version: 1.0.2
7
  * Author: Sajid Javed
8
  * Author URI: http://jwebsol.com
9
  * Text Domain: easy-facebook-likebox
3
  * Plugin Name: Easy Facebook Likebox
4
  * Plugin URI: httt://wordpress.org/plugins/easy-facebook-likebox
5
  * Description: Easy Facebook like box WordPress plugin allows you to easly display facebook like box fan page on your website using either widget or shortcode to increase facbook fan page likes. You can use the shortcode generated after saving the facebook like box widget. Its completely customizable with lots of optional settings. Its also responsive facebook like box at the same time.
6
+ * Version: 1.1.0
7
  * Author: Sajid Javed
8
  * Author URI: http://jwebsol.com
9
  * Text Domain: easy-facebook-likebox
includes/easy-facebook-likebox-widget.php CHANGED
@@ -49,7 +49,83 @@ class Easy_Facebook_Like_Box_Widget extends WP_Widget {
49
  $show_border = ( ! empty( $instance['show_border'] ) ) ? strip_tags( $instance['show_border'] ) : 1;
50
  $show_header = ( ! empty( $instance['show_header'] ) ) ? strip_tags( $instance['show_header'] ) : 1;*/
51
 
52
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  $defaults = array(
54
  'title' => '',
55
  'fb_appid' => '',
@@ -61,6 +137,8 @@ class Easy_Facebook_Like_Box_Widget extends WP_Widget {
61
  'show_stream' => 0,
62
  'show_header' => 1,
63
  'show_border' => 1,
 
 
64
  );
65
 
66
  $instance = wp_parse_args( (array) $instance, $defaults );
@@ -96,34 +174,58 @@ class Easy_Facebook_Like_Box_Widget extends WP_Widget {
96
  <input class="widefat" id="<?php echo $this->get_field_id( 'box_height' ); ?>" name="<?php echo $this->get_field_name( 'box_height' ); ?>" type="text" value="<?php echo esc_attr( $box_height ); ?>"><br />
97
  </p>
98
 
99
- <p>
100
  <label for="<?php echo $this->get_field_id( 'colorscheme' ); ?>"><?php _e( 'Colorscheme:' ); ?></label>
101
- <select id="<?php echo $this->get_field_id( 'colorscheme' ); ?>" name="<?php echo $this->get_field_name( 'colorscheme' ); ?>">
102
- <option <?php selected( $colorscheme, 'light' , $echo = true); ?> value="light">light</option>
103
- <option <?php selected( $colorscheme, 'dark', $echo = true); ?> value="dark">dark</option>
104
- </select>
105
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
- <p>
 
108
  <label for="<?php echo $this->get_field_id( 'show_faces' ); ?>">Show Faces</label>
109
- <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_faces' ); ?>" name="<?php echo $this->get_field_name( 'show_faces' ); ?>" value="1" <?php checked( $show_faces, 1 ); ?>>
110
  </p>
111
 
112
- <p>
113
- <label for="<?php echo $this->get_field_id( 'show_stream' ); ?>">Show Posts/Stream</label>
114
- <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_stream' ); ?>" name="<?php echo $this->get_field_name( 'show_stream' ); ?>" value="1" <?php checked( $show_stream, 1 ); ?>>
 
115
  </p>
116
 
117
- <p>
 
118
  <label for="<?php echo $this->get_field_id( 'show_border' ); ?>">Show Border</label>
119
- <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_border' ); ?>" name="<?php echo $this->get_field_name( 'show_border' ); ?>" value="1" <?php checked( $show_border, 1 ); ?>>
120
  </p>
121
 
122
- <p>
 
123
  <label for="<?php echo $this->get_field_id( 'show_header' ); ?>">Show Header</label>
124
- <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_header' ); ?>" name="<?php echo $this->get_field_name( 'show_header' ); ?>" value="1" <?php checked( $show_header, 1 ); ?>>
125
  </p>
126
 
 
 
127
  <p>Use Below shortcode to use inside pages or posts</p>
128
  <?php
129
  if( empty($show_stream) ){
@@ -141,10 +243,12 @@ class Easy_Facebook_Like_Box_Widget extends WP_Widget {
141
  if( empty($show_border) ){
142
  $show_border = 0;
143
  }
 
 
144
 
145
  ?>
146
 
147
- <p style="background:#ddd; padding:5px; "><?php echo '[efb_likebox fanpage_url="'.$fanpage_url.'" fb_appid="'.$fb_appid.'" box_width="'.$box_width.'" box_height="'.$box_height.'" colorscheme="'.$colorscheme.'" show_faces="'.$show_faces.'" show_header="'.$show_header.'" show_stream="'.$show_stream.'" show_border="'.$show_border.'" ]'?></p>
148
 
149
  <?php
150
  }
@@ -173,6 +277,10 @@ class Easy_Facebook_Like_Box_Widget extends WP_Widget {
173
  $instance['box_width'] = ( ! empty( $new_instance['box_width'] ) ) ? strip_tags( $new_instance['box_width'] ) : '';
174
  $instance['colorscheme'] = ( ! empty( $new_instance['colorscheme'] ) ) ? strip_tags( $new_instance['colorscheme'] ) : '';
175
 
 
 
 
 
176
  return $instance;
177
  }
178
 
49
  $show_border = ( ! empty( $instance['show_border'] ) ) ? strip_tags( $instance['show_border'] ) : 1;
50
  $show_header = ( ! empty( $instance['show_header'] ) ) ? strip_tags( $instance['show_header'] ) : 1;*/
51
 
52
+ $locales = array( 'af_ZA' => 'Afrikaans',
53
+ 'ar_AR' => 'Arabic',
54
+ 'az_AZ' => 'Azeri',
55
+ 'be_BY' => 'Belarusian',
56
+ 'bg_BG' => 'Bulgarian',
57
+ 'bn_IN' => 'Bengali',
58
+ 'bs_BA' => 'Bosnian',
59
+ 'ca_ES' => 'Catalan',
60
+ 'cs_CZ' => 'Czech',
61
+ 'cy_GB' => 'Welsh',
62
+ 'da_DK' => 'Danish',
63
+ 'de_DE' => 'German',
64
+ 'el_GR' => 'Greek',
65
+ 'en_US' => 'English (US)',
66
+ 'en_GB' => 'English (UK)',
67
+ 'eo_EO' => 'Esperanto',
68
+ 'es_ES' => 'Spanish (Spain)',
69
+ 'es_LA' => 'Spanish',
70
+ 'et_EE' => 'Estonian',
71
+ 'eu_ES' => 'Basque',
72
+ 'fa_IR' => 'Persian',
73
+ 'fb_LT' => 'Leet Speak',
74
+ 'fi_FI' => 'Finnish',
75
+ 'fo_FO' => 'Faroese',
76
+ 'fr_FR' => 'French (France)',
77
+ 'fr_CA' => 'French (Canada)',
78
+ 'fy_NL' => 'NETHERLANDS (NL)',
79
+ 'ga_IE' => 'Irish',
80
+ 'gl_ES' => 'Galician',
81
+ 'hi_IN' => 'Hindi',
82
+ 'hr_HR' => 'Croatian',
83
+ 'hu_HU' => 'Hungarian',
84
+ 'hy_AM' => 'Armenian',
85
+ 'id_ID' => 'Indonesian',
86
+ 'is_IS' => 'Icelandic',
87
+ 'it_IT' => 'Italian',
88
+ 'ja_JP' => 'Japanese',
89
+ 'ka_GE' => 'Georgian',
90
+ 'km_KH' => 'Khmer',
91
+ 'ko_KR' => 'Korean',
92
+ 'ku_TR' => 'Kurdish',
93
+ 'la_VA' => 'Latin',
94
+ 'lt_LT' => 'Lithuanian',
95
+ 'lv_LV' => 'Latvian',
96
+ 'mk_MK' => 'Macedonian',
97
+ 'ml_IN' => 'Malayalam',
98
+ 'ms_MY' => 'Malay',
99
+ 'nb_NO' => 'Norwegian (bokmal)',
100
+ 'ne_NP' => 'Nepali',
101
+ 'nl_NL' => 'Dutch',
102
+ 'nn_NO' => 'Norwegian (nynorsk)',
103
+ 'pa_IN' => 'Punjabi',
104
+ 'pl_PL' => 'Polish',
105
+ 'ps_AF' => 'Pashto',
106
+ 'pt_PT' => 'Portuguese (Portugal)',
107
+ 'pt_BR' => 'Portuguese (Brazil)',
108
+ 'ro_RO' => 'Romanian',
109
+ 'ru_RU' => 'Russian',
110
+ 'sk_SK' => 'Slovak',
111
+ 'sl_SI' => 'Slovenian',
112
+ 'sq_AL' => 'Albanian',
113
+ 'sr_RS' => 'Serbian',
114
+ 'sv_SE' => 'Swedish',
115
+ 'sw_KE' => 'Swahili',
116
+ 'ta_IN' => 'Tamil',
117
+ 'te_IN' => 'Telugu',
118
+ 'th_TH' => 'Thai',
119
+ 'tl_PH' => 'Filipino',
120
+ 'tr_TR' => 'Turkish',
121
+ 'uk_UA' => 'Ukrainian',
122
+ 'ur_PK' => 'Urdu',
123
+ 'vi_VN' => 'Vietnamese',
124
+ 'zh_CN' => 'Simplified Chinese (China)',
125
+ 'zh_HK' => 'Traditional Chinese (Hong Kong)',
126
+ 'zh_TW' => 'Traditional Chinese (Taiwan)',
127
+ );
128
+
129
  $defaults = array(
130
  'title' => '',
131
  'fb_appid' => '',
137
  'show_stream' => 0,
138
  'show_header' => 1,
139
  'show_border' => 1,
140
+ 'responsive' => 0,
141
+ 'locale' => 'en_US',
142
  );
143
 
144
  $instance = wp_parse_args( (array) $instance, $defaults );
174
  <input class="widefat" id="<?php echo $this->get_field_id( 'box_height' ); ?>" name="<?php echo $this->get_field_name( 'box_height' ); ?>" type="text" value="<?php echo esc_attr( $box_height ); ?>"><br />
175
  </p>
176
 
177
+ <p class="widget-half">
178
  <label for="<?php echo $this->get_field_id( 'colorscheme' ); ?>"><?php _e( 'Colorscheme:' ); ?></label>
179
+ <select id="<?php echo $this->get_field_id( 'colorscheme' ); ?>" name="<?php echo $this->get_field_name( 'colorscheme' ); ?>">
180
+ <option <?php selected( $colorscheme, 'light' , $echo = true); ?> value="light">light</option>
181
+ <option <?php selected( $colorscheme, 'dark', $echo = true); ?> value="dark">dark</option>
182
+ </select>
183
  </p>
184
+
185
+ <p class="widget-half">
186
+ <label for="<?php echo $this->get_field_id( 'locale' ); ?>"><?php _e( 'Locale:' ); ?></label>
187
+ <select id="<?php echo $this->get_field_id( 'locale' ); ?>" name="<?php echo $this->get_field_name( 'locale' ); ?>">
188
+ <?php if($locales){
189
+ foreach ($locales as $key=>$value){?>
190
+ <option <?php selected( $locale, $key , $echo = true); ?> value="<?php echo $key?>"><?php echo $value?></option>
191
+ <?php }
192
+ }?>
193
+ </select>
194
+ <i>Language</i>
195
+ </p>
196
+
197
+ <p class="widget-half">
198
+ <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'responsive' ); ?>" name="<?php echo $this->get_field_name( 'responsive' ); ?>" value="1" <?php checked( $responsive, 1 ); ?>>
199
+ <label for="<?php echo $this->get_field_id( 'responsive' ); ?>">Responsive</label>
200
+
201
+ </p>
202
 
203
+ <p class="widget-half">
204
+ <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_faces' ); ?>" name="<?php echo $this->get_field_name( 'show_faces' ); ?>" value="1" <?php checked( $show_faces, 1 ); ?>>
205
  <label for="<?php echo $this->get_field_id( 'show_faces' ); ?>">Show Faces</label>
206
+
207
  </p>
208
 
209
+ <p class="widget-half">
210
+ <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_stream' ); ?>" name="<?php echo $this->get_field_name( 'show_stream' ); ?>" value="1" <?php checked( $show_stream, 1 ); ?>>
211
+ <label for="<?php echo $this->get_field_id( 'show_stream' ); ?>">Show Posts</label>
212
+
213
  </p>
214
 
215
+ <p class="widget-half">
216
+ <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_border' ); ?>" name="<?php echo $this->get_field_name( 'show_border' ); ?>" value="1" <?php checked( $show_border, 1 ); ?>>
217
  <label for="<?php echo $this->get_field_id( 'show_border' ); ?>">Show Border</label>
218
+
219
  </p>
220
 
221
+ <p class="widget-half">
222
+ <input type="checkbox" class="widefat" id="<?php echo $this->get_field_id( 'show_header' ); ?>" name="<?php echo $this->get_field_name( 'show_header' ); ?>" value="1" <?php checked( $show_header, 1 ); ?>>
223
  <label for="<?php echo $this->get_field_id( 'show_header' ); ?>">Show Header</label>
224
+
225
  </p>
226
 
227
+ <div class="clearfix"></div>
228
+
229
  <p>Use Below shortcode to use inside pages or posts</p>
230
  <?php
231
  if( empty($show_stream) ){
243
  if( empty($show_border) ){
244
  $show_border = 0;
245
  }
246
+
247
+ $responsive = ( empty( $responsive ) ) ? strip_tags( 0 ) : $responsive;
248
 
249
  ?>
250
 
251
+ <p style="background:#ddd; padding:5px; "><?php echo '[efb_likebox fanpage_url="'.$fanpage_url.'" fb_appid="'.$fb_appid.'" box_width="'.$box_width.'" box_height="'.$box_height.'" colorscheme="'.$colorscheme.'" locale="'.$locale.'" responsive="'.$responsive.'" show_faces="'.$show_faces.'" show_header="'.$show_header.'" show_stream="'.$show_stream.'" show_border="'.$show_border.'" ]'?></p>
252
 
253
  <?php
254
  }
277
  $instance['box_width'] = ( ! empty( $new_instance['box_width'] ) ) ? strip_tags( $new_instance['box_width'] ) : '';
278
  $instance['colorscheme'] = ( ! empty( $new_instance['colorscheme'] ) ) ? strip_tags( $new_instance['colorscheme'] ) : '';
279
 
280
+ $instance['responsive'] = ( ! empty( $new_instance['responsive'] ) ) ? strip_tags( $new_instance['responsive'] ) : '';
281
+ $instance['locale'] = ( ! empty( $new_instance['locale'] ) ) ? strip_tags( $new_instance['locale'] ) : '';
282
+
283
+
284
  return $instance;
285
  }
286
 
public/assets/css/public.css CHANGED
@@ -1 +1,10 @@
1
- /* This stylesheet is used to style the public-facing components of the plugin. */
 
 
 
 
 
 
 
 
 
1
+ /* This stylesheet is used to style the public-facing components of the plugin. */
2
+ #fb-root {
3
+ display: none;
4
+ }
5
+
6
+ /* To fill the container and nothing else */
7
+
8
+ .responsive , .responsive span, .responsive span iframe[style], .responsive span img {
9
+ width: 100% !important;
10
+ }
public/easy-facebook-likebox.php CHANGED
@@ -328,6 +328,10 @@ class Easy_Facebook_Likebox {
328
  $fb_appid = '395202813876688';
329
  }
330
 
 
 
 
 
331
  $pieces = explode('/', $fanpage_url); // divides the string in pieces where '/' is found
332
  $page_name_id = end($pieces); //takes the last piece
333
 
@@ -335,17 +339,18 @@ class Easy_Facebook_Likebox {
335
  $show_faces = ( $show_faces == 1 ) ? 'data-show-faces=true' : 'data-show-faces=false';
336
  $show_border = ( $show_border == 1 ) ? 'data-show-border=true' : 'data-show-border=false' ;
337
  $show_header = ( $show_header == 1 ) ? 'data-header=true' : 'data-header=false';
 
338
 
339
  $returner = '<div id="fb-root"></div>
340
  <script>(function(d, s, id) {
341
  var js, fjs = d.getElementsByTagName(s)[0];
342
  if (d.getElementById(id)) return;
343
  js = d.createElement(s); js.id = id;
344
- js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId='.$fb_appid.'";
345
  fjs.parentNode.insertBefore(js, fjs);
346
  }(document, \'script\', \'facebook-jssdk\'));</script>';
347
 
348
- $returner .= '<div class="fb-like-box" data-href="https://www.facebook.com/'.$page_name_id.'" data-colorscheme="'.$colorscheme.'" data-width="'.$box_width.'" data-height="'.$box_height.'" '.$show_faces.' '.$show_header.' '.$show_stream.' '.$show_border.'></div>';
349
 
350
  /* echo '<pre>';
351
  echo htmlspecialchars($returner);
328
  $fb_appid = '395202813876688';
329
  }
330
 
331
+ if( empty( $locale ) ){
332
+ $locale = 'en_US';
333
+ }
334
+
335
  $pieces = explode('/', $fanpage_url); // divides the string in pieces where '/' is found
336
  $page_name_id = end($pieces); //takes the last piece
337
 
339
  $show_faces = ( $show_faces == 1 ) ? 'data-show-faces=true' : 'data-show-faces=false';
340
  $show_border = ( $show_border == 1 ) ? 'data-show-border=true' : 'data-show-border=false' ;
341
  $show_header = ( $show_header == 1 ) ? 'data-header=true' : 'data-header=false';
342
+ $responsive = ( $responsive == 1 ) ? 'responsive' : '';
343
 
344
  $returner = '<div id="fb-root"></div>
345
  <script>(function(d, s, id) {
346
  var js, fjs = d.getElementsByTagName(s)[0];
347
  if (d.getElementById(id)) return;
348
  js = d.createElement(s); js.id = id;
349
+ js.src = "//connect.facebook.net/'.$locale.'/all.js#xfbml=1&appId='.$fb_appid.'";
350
  fjs.parentNode.insertBefore(js, fjs);
351
  }(document, \'script\', \'facebook-jssdk\'));</script>';
352
 
353
+ $returner .= '<div class="fb-like-box '.$responsive.' " data-href="https://www.facebook.com/'.$page_name_id.'" data-colorscheme="'.$colorscheme.'" data-width="'.$box_width.'" data-height="'.$box_height.'" '.$show_faces.' '.$show_header.' '.$show_stream.' '.$show_border.'></div>';
354
 
355
  /* echo '<pre>';
356
  echo htmlspecialchars($returner);