Responsive Facebook Page Plugin - Version 1.2.0

Version Description

  • Added multilingual support. Language can be specified in the shortcode, otherwise it is retrievd from the site settings.
  • Added a shortcode generator dashboard widget to allow easier creation of the shortcode
  • Added a custom widget
Download this release

Release Info

Developer cameronjonesweb
Plugin Icon 128x128 Responsive Facebook Page Plugin
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.1 to 1.2.0

css/facebook-page-plugin-admin.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ #facebook-page-plugin-shortcode-generator p:after{clear:both;display:table;content:" ";}
2
+ #facebook-page-plugin-shortcode-generator input:not([type="checkbox"]),#facebook-page-plugin-shortcode-generator select{width:50%;}
3
+ #facebook-page-plugin-shortcode-generator input,#facebook-page-plugin-shortcode-generator select{float:right;}
4
+ #facebook-page-plugin-shortcode-generator #facebook-page-plugin-shortcode-generator-output{width:100%;float:none;}
facebook-page-feed-graph-api.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Facebook Page Feed (Graph API)
4
  * Plugin URI: https://cameronjones.x10.mx/projects/facebook-page-plugin
5
  * Description: Display the Facebook Page Plugin from the Graph API.
6
- * Version: 1.1.1
7
  * Author: Cameron Jones
8
  * Author URI: http://cameronjones.x10.mx
9
  * License: GPLv2
@@ -25,8 +25,11 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
25
  //Hooks
26
  add_shortcode( 'facebook-page-plugin', 'facebook_page_plugin' );
27
  add_filter( 'widget_text', 'do_shortcode' );
 
 
 
28
 
29
- function facebook_page_plugin($filter) {
30
  $return = NULL;
31
  $a = shortcode_atts( array(
32
  'href' => NULL,
@@ -34,11 +37,13 @@ function facebook_page_plugin($filter) {
34
  'height' => 130,
35
  'cover' => NULL,
36
  'facepile' => NULL,
37
- 'posts' => NULL
 
38
  ), $filter );
39
  if(isset($a['href']) && !empty($a['href'])){
40
- $return .= '<div id="fb-root"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=191521884244670&version=v2.3";fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>';
41
- $return .= '<div class="fb-page" data-href="http://facebook.com/' . $a["href"] . '" ';
 
42
  if(isset($a['width']) && !empty($a['width'])){
43
  $return .= ' data-width="' . $a['width'] . '"';
44
  }
@@ -65,4 +70,226 @@ function facebook_page_plugin($filter) {
65
  $return .= '></div>';
66
  }
67
  return $return;
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  * Plugin Name: Facebook Page Feed (Graph API)
4
  * Plugin URI: https://cameronjones.x10.mx/projects/facebook-page-plugin
5
  * Description: Display the Facebook Page Plugin from the Graph API.
6
+ * Version: 1.2.0
7
  * Author: Cameron Jones
8
  * Author URI: http://cameronjones.x10.mx
9
  * License: GPLv2
25
  //Hooks
26
  add_shortcode( 'facebook-page-plugin', 'facebook_page_plugin' );
27
  add_filter( 'widget_text', 'do_shortcode' );
28
+ add_action( 'wp_dashboard_setup', 'facebook_page_plugin_dashboard_widget' );
29
+ add_action( 'admin_enqueue_scripts', 'facebook_page_plugin_admin_resources' );
30
+ add_action( 'widgets_init', 'facebook_page_plugin_load_widget' );
31
 
32
+ function facebook_page_plugin( $filter ) {
33
  $return = NULL;
34
  $a = shortcode_atts( array(
35
  'href' => NULL,
37
  'height' => 130,
38
  'cover' => NULL,
39
  'facepile' => NULL,
40
+ 'posts' => NULL,
41
+ 'language' => get_bloginfo('language')
42
  ), $filter );
43
  if(isset($a['href']) && !empty($a['href'])){
44
+ $a['language'] = str_replace("-", "_", $a['language']);
45
+ $return .= '<div id="fb-root" data-version="1.2.0"></div><script>(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0];if (d.getElementById(id)) return;js = d.createElement(s); js.id = id;js.src = "//connect.facebook.net/' . $a['language'] . '/sdk.js#xfbml=1&appId=191521884244670&version=v2.3";fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>';
46
+ $return .= '<div class="fb-page" data-version="1.2.0" data-href="https://facebook.com/' . $a["href"] . '" ';
47
  if(isset($a['width']) && !empty($a['width'])){
48
  $return .= ' data-width="' . $a['width'] . '"';
49
  }
70
  $return .= '></div>';
71
  }
72
  return $return;
73
+ }
74
+
75
+ function facebook_page_plugin_dashboard_widget() {
76
+ wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', 'Facebook Page Plugin Shortcode Generator', 'facebook_page_plugin_dashboard_widget_callback' );
77
+ }
78
+
79
+ function facebook_page_plugin_dashboard_widget_callback() {
80
+ $lang_xml = file_get_contents('https://www.facebook.com/translations/FacebookLocales.xml');
81
+ $langs = new SimpleXMLElement($lang_xml);
82
+ echo '<form>';
83
+ echo '<p><label>Facebook Page URL: <input type="url" id="fbpp-href" /></label></p>';
84
+ echo '<p><label>Width (pixels): <input type="number" max="500" min="280" id="fbpp-width" /></label></p>';
85
+ echo '<p><label>Height (pixels): <input type="number" min="130" id="fbpp-height" /></label></p>';
86
+ echo '<p><label>Show Cover Photo: <input type="checkbox" value="true" id="fbpp-cover" /></label></p>';
87
+ echo '<p><label>Show Facepile: <input type="checkbox" value="true" id="fbpp-facepile" /></label></p>';
88
+ echo '<p><label>Show Posts Feed: <input type="checkbox" value="true" id="fbpp-posts" /></label></p>';
89
+ echo '<p><label>Language: <select id="fbpp-lang" /><option value="">Site Language</option>';
90
+ foreach($langs as $lang){
91
+ echo '<option value="' . $lang->codes->code->standard->representation . '">' . $lang->englishName . '</option>';
92
+ }
93
+ echo '</label></p>';
94
+ echo '<input type="text" readonly="readonly" id="facebook-page-plugin-shortcode-generator-output" onfocus="this.select()" />';
95
+ echo '</form>';
96
+ }
97
+
98
+ function facebook_page_plugin_admin_resources() {
99
+ wp_enqueue_script( 'Facebook Page Plugin Admin Scripts', plugin_dir_url( __FILE__ ) . '/js/facebook-page-plugin-admin.js' );
100
+ wp_enqueue_style( 'Facebook Page Plugin Admin Styles', plugin_dir_url( __FILE__ ) . '/css/facebook-page-plugin-admin.css' );
101
+ }
102
+
103
+ class facebook_page_plugin_widget extends WP_Widget {
104
+
105
+ private $facebookURLs = array('https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/');
106
+
107
+ function __construct() {
108
+ parent::__construct( 'facebook_page_plugin_widget', __('Facebook Page Plugin', 'facebook_page_plugin'), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook_page_plugin' ), ) );
109
+ }
110
+ public function widget( $args, $instance ) {
111
+ $title = apply_filters( 'widget_title', $instance['title'] );
112
+ if(isset($instance['href']) && !empty($instance['href'])){
113
+ $href = $instance['href'];
114
+ foreach($this->facebookURLs as $url){
115
+ $href = str_replace($url, '', $href);
116
+ }
117
+ } else {
118
+ $href = NULL;
119
+ }
120
+ if(isset($instance['width']) && !empty($instance['width'])){
121
+ $width = $instance['width'];
122
+ } else {
123
+ $width = NULL;
124
+ }
125
+ if(isset($instance['height']) && !empty($instance['height'])){
126
+ $height = $instance['height'];
127
+ } else {
128
+ $height = NULL;
129
+ }
130
+ if(isset($instance['cover']) && !empty($instance['cover'])){
131
+ $cover = $instance['cover'];
132
+ } else {
133
+ $cover = NULL;
134
+ }
135
+ if(isset($instance['facepile']) && !empty($instance['facepile'])){
136
+ $facepile = $instance['facepile'];
137
+ } else {
138
+ $facepile = NULL;
139
+ }
140
+ if(isset($instance['posts']) && !empty($instance['posts'])){
141
+ $posts = $instance['posts'];
142
+ } else {
143
+ $posts = NULL;
144
+ }
145
+ if(isset($instance['language']) && !empty($instance['language'])){
146
+ $language = $instance['language'];
147
+ } else {
148
+ $language = NULL;
149
+ }
150
+ echo $args['before_widget'];
151
+ if ( ! empty( $title ) ) {
152
+ echo $args['before_title'] . $title . $args['after_title'];
153
+ }
154
+ if( !empty($href )){
155
+ $shortcode = '[facebook-page-plugin href="' . $href . '"';
156
+ if(isset($width) && !empty($width)){
157
+ $shortcode .= ' width="' . $width . '"';
158
+ }
159
+ if(isset($height) && !empty($height)){
160
+ $shortcode .= ' height="' . $height . '"';
161
+ }
162
+ if(isset($cover) && !empty($cover)){
163
+ $shortcode .= ' cover="' . $cover . '"';
164
+ }
165
+ if(isset($facepile) && !empty($facepile)){
166
+ $shortcode .= ' facepile="' . $facepile . '"';
167
+ }
168
+ if(isset($posts) && !empty($posts)){
169
+ $shortcode .= ' posts="' . $posts . '"';
170
+ }
171
+ if(isset($language) && !empty($language)){
172
+ $shortcode .= ' language="' . $language . '"';
173
+ }
174
+ $shortcode .= ']';
175
+ echo do_shortcode( $shortcode );
176
+ }
177
+ echo $args['after_widget'];
178
+ }
179
+ public function form( $instance ) {
180
+ if ( isset( $instance[ 'title' ] ) ) {
181
+ $title = $instance[ 'title' ];
182
+ } else {
183
+ $title = __( 'New title', 'facebook_page_plugin' );
184
+ }
185
+ if ( isset( $instance[ 'href' ] ) ) {
186
+ $href = $instance[ 'href' ];
187
+ } else {
188
+ $href = '';
189
+ }
190
+ if ( isset( $instance[ 'width' ] ) ) {
191
+ $width = $instance[ 'width' ];
192
+ } else {
193
+ $width = '';
194
+ }
195
+ if ( isset( $instance[ 'height' ] ) ) {
196
+ $height = $instance[ 'height' ];
197
+ } else {
198
+ $height = '';
199
+ }
200
+ if ( isset( $instance[ 'cover' ] ) ) {
201
+ $cover = $instance[ 'cover' ];
202
+ } else {
203
+ $cover = 'false';
204
+ }
205
+ if ( isset( $instance[ 'facepile' ] ) ) {
206
+ $facepile = $instance[ 'facepile' ];
207
+ } else {
208
+ $facepile = 'false';
209
+ }
210
+ if ( isset( $instance[ 'posts' ] ) ) {
211
+ $posts = $instance[ 'posts' ];
212
+ } else {
213
+ $posts = 'false';
214
+ }
215
+ if ( isset( $instance[ 'language' ] ) ) {
216
+ $language = $instance[ 'language' ];
217
+ } else {
218
+ $language = '';
219
+ }
220
+ $lang_xml = file_get_contents('https://www.facebook.com/translations/FacebookLocales.xml');
221
+ $langs = new SimpleXMLElement($lang_xml);
222
+ echo '<p>';
223
+ echo '<label for="' . $this->get_field_id( 'title' ) . '">';
224
+ echo _e( 'Title:' );
225
+ echo '</label>';
226
+ echo '<input class="widefat" id="<?php' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . esc_attr( $title ) . '" />';
227
+ echo '</p>';
228
+ echo '<p>';
229
+ echo '<label for="<?php' . $this->get_field_id( 'href' ) . '">';
230
+ echo _e( 'Page URL:' );
231
+ echo '</label>';
232
+ echo '<input class="widefat" id="' . $this->get_field_id( 'href' ) . '" name="' . $this->get_field_name( 'href' ) . '" type="url" value="' . esc_attr( $href ) . '" required />';
233
+ echo '</p>';
234
+ echo '<p>';
235
+ echo '<label for="<?php' . $this->get_field_id( 'width' ) . '">';
236
+ echo _e( 'Width:' );
237
+ echo '</label>';
238
+ echo '<input class="widefat" id="' . $this->get_field_id( 'width' ) . '" name="' . $this->get_field_name( 'width' ) . '" type="number" min="280" max="500" value="' . esc_attr( $width ) . '" />';
239
+ echo '</p>';
240
+ echo '<p>';
241
+ echo '<label for="<?php' . $this->get_field_id( 'height' ) . '">';
242
+ echo _e( 'Height:' );
243
+ echo '</label>';
244
+ echo '<input class="widefat" id="' . $this->get_field_id( 'height' ) . '" name="' . $this->get_field_name( 'height' ) . '" type="number" min="130" value="' . esc_attr( $height ) . '" />';
245
+ echo '</p>';
246
+ echo '<p>';
247
+ echo '<label for="<?php' . $this->get_field_id( 'cover' ) . '">';
248
+ echo _e( 'Cover Photo:' );
249
+ echo '</label>';
250
+ echo ' <input class="widefat" id="' . $this->get_field_id( 'cover' ) . '" name="' . $this->get_field_name( 'cover' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $cover ), 'true', false ) . ' />';
251
+ echo '</p>';
252
+ echo '<p>';
253
+ echo '<label for="<?php' . $this->get_field_id( 'facepile' ) . '">';
254
+ echo _e( 'Show Facepile:' );
255
+ echo '</label>';
256
+ echo ' <input class="widefat" id="' . $this->get_field_id( 'facepile' ) . '" name="' . $this->get_field_name( 'facepile' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $facepile ), 'true', false ) . ' />';
257
+ echo '</p>';
258
+ echo '<p>';
259
+ echo '<label for="<?php' . $this->get_field_id( 'posts' ) . '">';
260
+ echo _e( 'Show Posts:' );
261
+ echo '</label>';
262
+ echo ' <input class="widefat" id="' . $this->get_field_id( 'posts' ) . '" name="' . $this->get_field_name( 'facepile' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $posts ), 'true', false ) . ' />';
263
+ echo '</p>';
264
+ echo '<p>';
265
+ echo '<label for="<?php' . $this->get_field_id( 'language' ) . '">';
266
+ echo _e( 'Language:' );
267
+ echo '</label>';
268
+ echo '<select class="widefat" id="' . $this->get_field_id( 'language' ) . '" name="' . $this->get_field_name( 'language' ) . '">';
269
+ echo '<option value="">Site Lanugage (default)</option>';
270
+ foreach($langs as $lang){
271
+ echo '<option value="' . $lang->codes->code->standard->representation . '"' . selected( esc_attr( $language ), $lang->codes->code->standard->representation, false ) . '>' . $lang->englishName . '</option>';
272
+ }
273
+ echo '</select>';
274
+ echo '</p>';
275
+ }
276
+
277
+ // Updating widget replacing old instances with new
278
+ public function update( $new_instance, $old_instance ) {
279
+ $instance = array();
280
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
281
+ $instance['href'] = ( ! empty( $new_instance['href'] ) ) ? strip_tags( $new_instance['href'] ) : '';
282
+ $instance['width'] = ( ! empty( $new_instance['width'] ) ) ? strip_tags( $new_instance['width'] ) : '';
283
+ $instance['height'] = ( ! empty( $new_instance['height'] ) ) ? strip_tags( $new_instance['height'] ) : '';
284
+ $instance['cover'] = ( ! empty( $new_instance['cover'] ) ) ? strip_tags( $new_instance['cover'] ) : '';
285
+ $instance['facepile'] = ( ! empty( $new_instance['facepile'] ) ) ? strip_tags( $new_instance['facepile'] ) : '';
286
+ $instance['posts'] = ( ! empty( $new_instance['posts'] ) ) ? strip_tags( $new_instance['posts'] ) : '';
287
+ $instance['language'] = ( ! empty( $new_instance['language'] ) ) ? strip_tags( $new_instance['language'] ) : '';
288
+ return $instance;
289
+ }
290
+ } // Class wpb_widget ends here
291
+
292
+ // Register and load the widget
293
+ function facebook_page_plugin_load_widget() {
294
+ register_widget( 'facebook_page_plugin_widget' );
295
+ }
js/facebook-page-plugin-admin.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ $(document).ready(function(){
3
+ $('#facebook-page-plugin-shortcode-generator form').submit(function(e){
4
+ e.preventDefault();
5
+ });
6
+ var $facebookURLs = ['https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/'];
7
+ $('#facebook-page-plugin-shortcode-generator input').change(function(){
8
+ var $shortcode = '';
9
+ $shortcode += '[facebook-page-plugin ';
10
+ var $href = $('#fbpp-href').val();
11
+ for(i = 0; i < $facebookURLs.length; i++) {
12
+ $href = $href.replace($facebookURLs[i],'');
13
+ }
14
+ if($href.length > 0){
15
+ $shortcode += 'href="' + $href + '" ';
16
+ var $width = $('#fbpp-width').val();
17
+ if($width.length > 0){
18
+ $shortcode += 'width="' + $width + '" ';
19
+ }
20
+ var $height = $('#fbpp-height').val();
21
+ if($height.length > 0){
22
+ $shortcode += 'height="' + $height + '" ';
23
+ }
24
+ var $cover = $('#fbpp-cover').prop("checked");
25
+ $shortcode += 'cover="' + $cover + '" ';
26
+ var $facepile = $('#fbpp-facepile').prop("checked");
27
+ $shortcode += 'facepile="' + $facepile + '" ';
28
+ var $posts = $('#fbpp-posts').prop("checked");
29
+ $shortcode += 'posts="' + $posts + '" ';
30
+ var $lang = $('#fbpp-lang').val();
31
+ if($lang.length > 0){
32
+ $shortcode += 'lang="' + $lang + '" ';
33
+ }
34
+ $shortcode += ' ]';
35
+ $('#facebook-page-plugin-shortcode-generator-output').val($shortcode);
36
+ }
37
+ });
38
+ });
39
+ }(jQuery));
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Facebook Page Plugin ===
2
  Contributors: cameronjonesweb
3
- Tags: facebook,social,like,facepile,activity feed,recommendations,shortcode
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=WLV5HPHSPM2BG&lc=AU&item_name=Cameron%20Jones%20Web%20Development�cy_code=AUD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
- Stable tag: 1.1.1
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
 
@@ -13,7 +13,9 @@ Display the Facebook Page Plugin from the Graph API.
13
  == Description ==
14
  Facebook are depreciating many of their old social plugins on June 23rd 2015, including Activity Feed, Facepile, Like Box and Recommendations. As such, many WordPress plugins that utilise these social plugins will soon stop working. This plugin instead uses the Graph API v2.3 to guarantee your WordPress site continues to have full Facebook support.
15
 
16
- This plugin is shortcode based, unlike many other Facebook social plugins that are available. Simply call the [facebook-page-plugin] shortcode and set your settings within the shortcode. Place it wherever you like, as often as you like.
 
 
17
 
18
  == Installation ==
19
 
@@ -33,6 +35,10 @@ This plugin is shortcode based, unlike many other Facebook social plugins that a
33
 
34
  == Frequently Asked Questions ==
35
  = How do I use the plugin? =
 
 
 
 
36
  The Facebook Page Plugin uses a shortcode to insert the page feed. You set your settings within the shortcode.
37
  `[facebook-page-plugin setting="value"]`
38
  Available settings:
@@ -49,11 +55,13 @@ Available settings:
49
 
50
  `posts` (true/false, display page posts, default false)
51
 
 
 
52
  Example: `[facebook-page-plugin href="facebook" width="300" height="500" cover="true" facepile="true" posts="true"]`
53
- This will display a Facebook page feed that loads in the page `facebook.com/facebook` that is 300px wide, 500px high, displaying the page's cover photo, facepile and recent posts. See the screenshots tab for a demonstration of how it will appear
54
 
55
  = What languages are available? =
56
- English. Multi language support is coming shortly in version 1.2.0
57
 
58
  = My Facebook page isn't loading =
59
  If the URL for your page is http://facebook.com/ABC123 then when you use the shortcode don't include the domain, instead use like so: `[facebook-page-plugin href="ABC123"]`
@@ -64,8 +72,14 @@ Shortcodes were introduced in WordPress 2.5, so theorectially it should work on
64
 
65
  == Screenshots ==
66
  1. Installation example
 
 
67
 
68
  == Changelog ==
 
 
 
 
69
  = 1.1.1 =
70
  * Fixed height bug
71
  = 1.1.0 =
@@ -78,8 +92,10 @@ Shortcodes were introduced in WordPress 2.5, so theorectially it should work on
78
  * Initial release
79
 
80
  == Upgrade Notice ==
 
 
81
  = 1.1.1 =
82
- Fixed height bug
83
  = 1.1.0 =
84
  Added filter to allow calling of shortcodes in the text widget
85
  = 1.0.0 =
1
  === Facebook Page Plugin ===
2
  Contributors: cameronjonesweb
3
+ Tags: facebook,social,like,facepile,activity feed,recommendations,shortcode,widget,shortcode generator,plugin,admin,sidebar,facebook page
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=WLV5HPHSPM2BG&lc=AU&item_name=Cameron%20Jones%20Web%20Development�cy_code=AUD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
5
  Requires at least: 4.0
6
  Tested up to: 4.2.2
7
+ Stable tag: 1.2.0
8
  License: GPLv2
9
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10
 
13
  == Description ==
14
  Facebook are depreciating many of their old social plugins on June 23rd 2015, including Activity Feed, Facepile, Like Box and Recommendations. As such, many WordPress plugins that utilise these social plugins will soon stop working. This plugin instead uses the Graph API v2.3 to guarantee your WordPress site continues to have full Facebook support.
15
 
16
+ This plugin can be used by added the widget to a widget area and filling out the form, or by using the `[facebook-page-plugin]` shortcode to display the plugin wherever you like, as often as you like.
17
+
18
+ If you like the plugin, please take the time to leave a review.
19
 
20
  == Installation ==
21
 
35
 
36
  == Frequently Asked Questions ==
37
  = How do I use the plugin? =
38
+ As of version 1.2.0, a custom widget has been included. If you wish to display your Facebook Page Plugin in a widget area it is recommended that you use the widget. Simply drag and drop the widget into the widget area and fill out the form.
39
+
40
+ If you require a shortcode, it is recommended that you use the shortcode generator on your site dashboard. Simply fill in the relevant information and then copy the
41
+
42
  The Facebook Page Plugin uses a shortcode to insert the page feed. You set your settings within the shortcode.
43
  `[facebook-page-plugin setting="value"]`
44
  Available settings:
55
 
56
  `posts` (true/false, display page posts, default false)
57
 
58
+ 'language' (languageCode_countryCode eg: en_US, language of the plugin, default site language)
59
+
60
  Example: `[facebook-page-plugin href="facebook" width="300" height="500" cover="true" facepile="true" posts="true"]`
61
+ This will display a Facebook page feed that loads in the page `facebook.com/facebook` that is 300px wide, 500px high, displaying the page's cover photo, facepile and recent posts in the same language as the site. See the screenshots tab for a demonstration of how it will appear
62
 
63
  = What languages are available? =
64
+ As of version 1.2.0, the plugin is available in all languages provided by Facebook ( full list availabe [here](https://www.facebook.com/translations/FacebookLocales.xml) ). By default it uses the same language as the site, but alternatively you can specify the language in the shortcode. The dashboard widget is only available in English.
65
 
66
  = My Facebook page isn't loading =
67
  If the URL for your page is http://facebook.com/ABC123 then when you use the shortcode don't include the domain, instead use like so: `[facebook-page-plugin href="ABC123"]`
72
 
73
  == Screenshots ==
74
  1. Installation example
75
+ 2. Example of the new widget introduced in version 1.2.0
76
+ 3. The new shortcode generator dashboard widget
77
 
78
  == Changelog ==
79
+ = 1.2.0 =
80
+ * Added multilingual support. Language can be specified in the shortcode, otherwise it is retrievd from the site settings.
81
+ * Added a shortcode generator dashboard widget to allow easier creation of the shortcode
82
+ * Added a custom widget
83
  = 1.1.1 =
84
  * Fixed height bug
85
  = 1.1.0 =
92
  * Initial release
93
 
94
  == Upgrade Notice ==
95
+ = 1.2.0 =
96
+ This version includes multilingual support, a custom widget and a shortcode generator on the admin dashboard. It is highly recommeded that you update.
97
  = 1.1.1 =
98
+ Fixed height bug where height would only ever be the same value as width. Update immediately.
99
  = 1.1.0 =
100
  Added filter to allow calling of shortcodes in the text widget
101
  = 1.0.0 =
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file