Version Description
- Options to remove and customise the page link that displays while the plugin loads
- Fixed
undefined index
error when adding a new instance of the plugin in the customizer - Updated all admin text to be multi-lingual compatible
- Updated
posts
option totabs
- Updated screenshots and example
Download this release
Release Info
Developer | cameronjonesweb |
Plugin | Responsive Facebook Page Plugin |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.4.0
- facebook-page-feed-graph-api.php +131 -56
- js/facebook-page-plugin-admin.js +4 -0
- readme.txt +46 -8
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
facebook-page-feed-graph-api.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Facebook Page Plugin
|
4 |
* Plugin URI: https://cameronjones.x10.mx/projects/facebook-page-plugin
|
5 |
* Description: It's time to upgrade from your old like box! Display the Facebook Page Plugin from the Graph API using a shortcode or widget. Now available in 95 different languages
|
6 |
-
* Version: 1.
|
7 |
* Author: Cameron Jones
|
8 |
* Author URI: http://cameronjones.x10.mx
|
9 |
* License: GPLv2
|
@@ -30,6 +30,7 @@ add_action( 'admin_enqueue_scripts', 'facebook_page_plugin_admin_resources' );
|
|
30 |
add_action( 'widgets_init', 'facebook_page_plugin_load_widget' );
|
31 |
add_action( 'admin_notices', 'facebook_page_plugin_admin_notice' );
|
32 |
add_action( 'admin_init', 'facebook_page_plugin_admin_notice_ignore' );
|
|
|
33 |
|
34 |
function facebook_page_plugin( $filter ) {
|
35 |
$return = NULL;
|
@@ -40,15 +41,18 @@ function facebook_page_plugin( $filter ) {
|
|
40 |
'cover' => NULL,
|
41 |
'facepile' => NULL,
|
42 |
'posts' => NULL,
|
|
|
43 |
'language' => get_bloginfo('language'),
|
44 |
'cta' => NULL,
|
45 |
'small' => NULL,
|
46 |
'adapt' => NULL,
|
|
|
|
|
47 |
), $filter );
|
48 |
if(isset($a['href']) && !empty($a['href'])){
|
49 |
$a['language'] = str_replace("-", "_", $a['language']);
|
50 |
-
$return .= '<div id="fb-root" data-version="1.
|
51 |
-
$return .= '<div class="fb-page" data-version="1.
|
52 |
if(isset($a['width']) && !empty($a['width'])){
|
53 |
$return .= ' data-width="' . $a['width'] . '"';
|
54 |
}
|
@@ -65,8 +69,14 @@ function facebook_page_plugin( $filter ) {
|
|
65 |
if(isset($a['facepile']) && !empty($a['facepile'])){
|
66 |
$return .= ' data-show-facepile="' . $a['facepile'] . '"';
|
67 |
}
|
68 |
-
if(isset($a['
|
69 |
-
$return .= ' data-
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
if(isset($a['cta']) && !empty($a['cta'])){
|
72 |
$return .= ' data-hide-cta="' . $a['cta'] . '"';
|
@@ -79,13 +89,25 @@ function facebook_page_plugin( $filter ) {
|
|
79 |
} else {
|
80 |
$return .= ' data-adapt-container-width="false"';
|
81 |
}
|
82 |
-
$return .= '><div class="fb-xfbml-parse-ignore"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
return $return;
|
85 |
}
|
86 |
|
87 |
function facebook_page_plugin_dashboard_widget() {
|
88 |
-
wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', 'Facebook Page Plugin Shortcode Generator', 'facebook_page_plugin_dashboard_widget_callback' );
|
89 |
}
|
90 |
|
91 |
function facebook_page_plugin_dashboard_widget_callback() {
|
@@ -101,20 +123,22 @@ function facebook_page_plugin_dashboard_widget_callback() {
|
|
101 |
$langs = NULL;
|
102 |
}
|
103 |
echo '<form>';
|
104 |
-
echo '<p><label>Facebook Page URL: <input type="url" id="fbpp-href" /></label></p>';
|
105 |
-
echo '<p><label>Width (pixels): <input type="number" max="500" min="180" id="fbpp-width" /></label></p>';
|
106 |
-
echo '<p><label>Height (pixels): <input type="number" min="70" id="fbpp-height" /></label></p>';
|
107 |
-
echo '<p><label>Show Cover Photo: <input type="checkbox" value="true" id="fbpp-cover" /></label></p>';
|
108 |
-
echo '<p><label>Show Facepile: <input type="checkbox" value="true" id="fbpp-facepile" /></label></p>';
|
109 |
-
echo '<p><label>
|
110 |
-
echo '<p><label>Hide Call To Action: <input type="checkbox" value="true" id="fbpp-cta" /></label></p>';
|
111 |
-
echo '<p><label>Small Header: <input type="checkbox" value="true" id="fbpp-small" /></label></p>';
|
112 |
-
echo '<p><label>Adaptive Width: <input type="checkbox" value="true" id="fbpp-adapt" checked /></label></p>';
|
113 |
-
echo '<p><label>
|
|
|
|
|
114 |
if(isset($langs) && !empty($langs)){
|
115 |
foreach($langs as $lang){
|
116 |
-
echo '<option value="' . $lang->codes->code->standard->representation . '">' . $lang->englishName . '</option>'; // This is for Facebook loaded only
|
117 |
-
echo '<option value="' . $lang->standard->representation . '">' . $lang->englishName . '</option>';
|
118 |
}
|
119 |
}
|
120 |
echo '</label></p>';
|
@@ -132,10 +156,14 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
132 |
private $facebookURLs = array('https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/');
|
133 |
|
134 |
function __construct() {
|
135 |
-
parent::__construct( 'facebook_page_plugin_widget', __('Facebook Page Plugin', 'facebook-page-feed-graph-api'), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ), ) );
|
136 |
}
|
137 |
public function widget( $args, $instance ) {
|
138 |
-
$title
|
|
|
|
|
|
|
|
|
139 |
if(isset($instance['href']) && !empty($instance['href'])){
|
140 |
$href = $instance['href'];
|
141 |
foreach($this->facebookURLs as $url){
|
@@ -164,10 +192,10 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
164 |
} else {
|
165 |
$facepile = 'false';
|
166 |
}
|
167 |
-
if(isset($instance['
|
168 |
-
$
|
169 |
} else {
|
170 |
-
$
|
171 |
}
|
172 |
if(isset($instance['cta']) && !empty($instance['cta'])){
|
173 |
$cta = 'true';
|
@@ -184,6 +212,16 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
184 |
} else {
|
185 |
$adapt = 'false';
|
186 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
if(isset($instance['language']) && !empty($instance['language'])){
|
188 |
$language = $instance['language'];
|
189 |
} else {
|
@@ -195,33 +233,39 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
195 |
}
|
196 |
if( !empty($href )){
|
197 |
$shortcode = '[facebook-page-plugin href="' . $href . '"';
|
198 |
-
if(isset($width) && !empty($width)){
|
199 |
$shortcode .= ' width="' . $width . '"';
|
200 |
}
|
201 |
-
if(isset($height) && !empty($height)){
|
202 |
$shortcode .= ' height="' . $height . '"';
|
203 |
}
|
204 |
-
if(isset($cover) && !empty($cover)){
|
205 |
$shortcode .= ' cover="' . $cover . '"';
|
206 |
}
|
207 |
-
if(isset($facepile) && !empty($facepile)){
|
208 |
$shortcode .= ' facepile="' . $facepile . '"';
|
209 |
}
|
210 |
-
if(isset($
|
211 |
-
$shortcode .= '
|
212 |
}
|
213 |
-
if(isset($language) && !empty($language)){
|
214 |
$shortcode .= ' language="' . $language . '"';
|
215 |
}
|
216 |
-
if(isset($cta) && !empty($cta)){
|
217 |
$shortcode .= ' cta="' . $cta . '"';
|
218 |
}
|
219 |
-
if(isset($small) && !empty($small)){
|
220 |
$shortcode .= ' small="' . $small . '"';
|
221 |
}
|
222 |
-
if(isset($adapt) && !empty($adapt)){
|
223 |
$shortcode .= ' adapt="' . $adapt . '"';
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
$shortcode .= ']';
|
226 |
echo do_shortcode( $shortcode );
|
227 |
}
|
@@ -258,10 +302,10 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
258 |
} else {
|
259 |
$facepile = 'false';
|
260 |
}
|
261 |
-
if ( isset( $instance[ '
|
262 |
-
$
|
263 |
} else {
|
264 |
-
$
|
265 |
}
|
266 |
if ( isset( $instance[ 'cta' ] ) ) {
|
267 |
$cta = $instance[ 'cta' ];
|
@@ -278,6 +322,16 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
278 |
} else {
|
279 |
$adapt = 'true';
|
280 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
if ( isset( $instance[ 'language' ] ) ) {
|
282 |
$language = $instance[ 'language' ];
|
283 |
} else {
|
@@ -286,7 +340,7 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
286 |
try {
|
287 |
//$lang_xml = file_get_contents('https://www.facebook.com/translations/FacebookLocales.xml');
|
288 |
$lang_xml = file_get_contents( plugin_dir_url( __FILE__ ) . 'lang.xml');
|
289 |
-
}catch(Exception $ex){
|
290 |
$lang_xml = NULL;
|
291 |
}
|
292 |
if(isset($lang_xml) && !empty($lang_xml)){
|
@@ -296,74 +350,86 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
296 |
}
|
297 |
echo '<p>';
|
298 |
echo '<label for="' . $this->get_field_id( 'title' ) . '">';
|
299 |
-
|
300 |
echo '</label>';
|
301 |
echo '<input class="widefat" id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . esc_attr( $title ) . '" />';
|
302 |
echo '</p>';
|
303 |
echo '<p>';
|
304 |
echo '<label for="' . $this->get_field_id( 'href' ) . '">';
|
305 |
-
|
306 |
echo '</label>';
|
307 |
echo '<input class="widefat" id="' . $this->get_field_id( 'href' ) . '" name="' . $this->get_field_name( 'href' ) . '" type="url" value="' . esc_attr( $href ) . '" required />';
|
308 |
echo '</p>';
|
309 |
echo '<p>';
|
310 |
echo '<label for="' . $this->get_field_id( 'width' ) . '">';
|
311 |
-
|
312 |
echo '</label>';
|
313 |
echo '<input class="widefat" id="' . $this->get_field_id( 'width' ) . '" name="' . $this->get_field_name( 'width' ) . '" type="number" min="180" max="500" value="' . esc_attr( $width ) . '" />';
|
314 |
echo '</p>';
|
315 |
echo '<p>';
|
316 |
echo '<label for="' . $this->get_field_id( 'height' ) . '">';
|
317 |
-
|
318 |
echo '</label>';
|
319 |
echo '<input class="widefat" id="' . $this->get_field_id( 'height' ) . '" name="' . $this->get_field_name( 'height' ) . '" type="number" min="70" value="' . esc_attr( $height ) . '" />';
|
320 |
echo '</p>';
|
321 |
echo '<p>';
|
322 |
echo '<label for="' . $this->get_field_id( 'cover' ) . '">';
|
323 |
-
|
324 |
echo '</label>';
|
325 |
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 ) . ' />';
|
326 |
echo '</p>';
|
327 |
echo '<p>';
|
328 |
echo '<label for="' . $this->get_field_id( 'facepile' ) . '">';
|
329 |
-
|
330 |
echo '</label>';
|
331 |
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 ) . ' />';
|
332 |
echo '</p>';
|
333 |
echo '<p>';
|
334 |
-
echo '<label for="' . $this->get_field_id( '
|
335 |
-
|
336 |
echo '</label>';
|
337 |
-
echo ' <
|
338 |
echo '</p>';
|
339 |
echo '<p>';
|
340 |
echo '<label for="' . $this->get_field_id( 'cta' ) . '">';
|
341 |
-
|
342 |
echo '</label>';
|
343 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'cta' ) . '" name="' . $this->get_field_name( 'cta' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $cta ), 'true', false ) . ' />';
|
344 |
echo '</p>';
|
345 |
echo '<p>';
|
346 |
echo '<label for="' . $this->get_field_id( 'small' ) . '">';
|
347 |
-
|
348 |
echo '</label>';
|
349 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'small' ) . '" name="' . $this->get_field_name( 'small' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $small ), 'true', false ) . ' />';
|
350 |
echo '</p>';
|
351 |
echo '<p>';
|
352 |
echo '<label for="' . $this->get_field_id( 'adapt' ) . '">';
|
353 |
-
|
354 |
echo '</label>';
|
355 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'adapt' ) . '" name="' . $this->get_field_name( 'adapt' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $adapt ), 'true', false ) . ' />';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
echo '</p>';
|
357 |
echo '<p>';
|
358 |
echo '<label for="' . $this->get_field_id( 'language' ) . '">';
|
359 |
-
|
360 |
echo '</label>';
|
361 |
echo '<select class="widefat" id="' . $this->get_field_id( 'language' ) . '" name="' . $this->get_field_name( 'language' ) . '">';
|
362 |
-
echo '<option value="">Site Language (default)</option>';
|
363 |
if(isset($langs) && !empty($langs)){
|
364 |
foreach($langs as $lang){
|
365 |
-
//echo '<option value="' . $lang->codes->code->standard->representation . '"' . selected( esc_attr( $language ), $lang->codes->code->standard->representation, false ) . '>' . $lang->englishName . '</option>'; // Facebook only
|
366 |
-
echo '<option value="' . $lang->standard->representation . '"' . selected( esc_attr( $language ), $lang->standard->representation, false ) . '>' . $lang->englishName . '</option>';
|
367 |
}
|
368 |
}
|
369 |
echo '</select>';
|
@@ -379,10 +445,12 @@ class facebook_page_plugin_widget extends WP_Widget {
|
|
379 |
$instance['height'] = ( ! empty( $new_instance['height'] ) ) ? strip_tags( $new_instance['height'] ) : '';
|
380 |
$instance['cover'] = ( ! empty( $new_instance['cover'] ) ) ? strip_tags( $new_instance['cover'] ) : '';
|
381 |
$instance['facepile'] = ( ! empty( $new_instance['facepile'] ) ) ? strip_tags( $new_instance['facepile'] ) : '';
|
382 |
-
$instance['
|
383 |
$instance['cta'] = ( ! empty( $new_instance['cta'] ) ) ? strip_tags( $new_instance['cta'] ) : '';
|
384 |
$instance['small'] = ( ! empty( $new_instance['small'] ) ) ? strip_tags( $new_instance['small'] ) : '';
|
385 |
$instance['adapt'] = ( ! empty( $new_instance['adapt'] ) ) ? strip_tags( $new_instance['adapt'] ) : '';
|
|
|
|
|
386 |
$instance['language'] = ( ! empty( $new_instance['language'] ) ) ? strip_tags( $new_instance['language'] ) : '';
|
387 |
return $instance;
|
388 |
}
|
@@ -400,7 +468,9 @@ function facebook_page_plugin_admin_notice() {
|
|
400 |
global $current_user ;
|
401 |
$user_id = $current_user->ID;
|
402 |
if ( !get_user_meta( $user_id, 'facebook_page_plugin_admin_notice_ignore' ) || get_user_meta( $user_id, 'facebook_page_plugin_admin_notice_ignore' ) === false ) {
|
403 |
-
echo '<div class="updated" id="facebook-page-plugin-review"><p>
|
|
|
|
|
404 |
}
|
405 |
}
|
406 |
}
|
@@ -412,3 +482,8 @@ function facebook_page_plugin_admin_notice_ignore() {
|
|
412 |
update_user_meta($user_id, 'facebook_page_plugin_admin_notice_ignore', 'true', true);
|
413 |
}
|
414 |
}
|
|
|
|
|
|
|
|
|
|
3 |
* Plugin Name: Facebook Page Plugin
|
4 |
* Plugin URI: https://cameronjones.x10.mx/projects/facebook-page-plugin
|
5 |
* Description: It's time to upgrade from your old like box! Display the Facebook Page Plugin from the Graph API using a shortcode or widget. Now available in 95 different languages
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: Cameron Jones
|
8 |
* Author URI: http://cameronjones.x10.mx
|
9 |
* License: GPLv2
|
30 |
add_action( 'widgets_init', 'facebook_page_plugin_load_widget' );
|
31 |
add_action( 'admin_notices', 'facebook_page_plugin_admin_notice' );
|
32 |
add_action( 'admin_init', 'facebook_page_plugin_admin_notice_ignore' );
|
33 |
+
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), 'facebook_page_plugin_action_links' );
|
34 |
|
35 |
function facebook_page_plugin( $filter ) {
|
36 |
$return = NULL;
|
41 |
'cover' => NULL,
|
42 |
'facepile' => NULL,
|
43 |
'posts' => NULL,
|
44 |
+
'tabs' => array(),
|
45 |
'language' => get_bloginfo('language'),
|
46 |
'cta' => NULL,
|
47 |
'small' => NULL,
|
48 |
'adapt' => NULL,
|
49 |
+
'link' => true,
|
50 |
+
'linktext' => NULL,
|
51 |
), $filter );
|
52 |
if(isset($a['href']) && !empty($a['href'])){
|
53 |
$a['language'] = str_replace("-", "_", $a['language']);
|
54 |
+
$return .= '<div id="fb-root" data-version="1.4.0"></div><script async>(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&version=v2.4";fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>';
|
55 |
+
$return .= '<div class="fb-page" data-version="1.4.0" data-href="https://facebook.com/' . $a["href"] . '" ';
|
56 |
if(isset($a['width']) && !empty($a['width'])){
|
57 |
$return .= ' data-width="' . $a['width'] . '"';
|
58 |
}
|
69 |
if(isset($a['facepile']) && !empty($a['facepile'])){
|
70 |
$return .= ' data-show-facepile="' . $a['facepile'] . '"';
|
71 |
}
|
72 |
+
if(isset($a['tabs']) && !empty($a['tabs'])){
|
73 |
+
$return .= ' data-tabs="' . $a['tabs'] . '"';
|
74 |
+
} else if(isset($a['posts']) && !empty($a['posts'])){
|
75 |
+
if($a['posts'] == 'true'){
|
76 |
+
$return .= ' data-tabs="timeline"';
|
77 |
+
} else {
|
78 |
+
$return .= ' data-tabs="false"';
|
79 |
+
}
|
80 |
}
|
81 |
if(isset($a['cta']) && !empty($a['cta'])){
|
82 |
$return .= ' data-hide-cta="' . $a['cta'] . '"';
|
89 |
} else {
|
90 |
$return .= ' data-adapt-container-width="false"';
|
91 |
}
|
92 |
+
$return .= '><div class="fb-xfbml-parse-ignore">';
|
93 |
+
if( $a['link'] == 'true' ){
|
94 |
+
$return .= '<blockquote cite="https://www.facebook.com/' . $a['href'] . '">';
|
95 |
+
$return .= '<a href="https://www.facebook.com/' . $a['href'] . '">';
|
96 |
+
if( empty( $a['linktext'] ) ) {
|
97 |
+
$return .= 'https://www.facebook.com/' . $a['href'];
|
98 |
+
} else {
|
99 |
+
$return .= $a['linktext'];
|
100 |
+
}
|
101 |
+
$return .= '</a>';
|
102 |
+
$return .= '</blockquote>';
|
103 |
+
}
|
104 |
+
$return .= '</div></div>';
|
105 |
}
|
106 |
return $return;
|
107 |
}
|
108 |
|
109 |
function facebook_page_plugin_dashboard_widget() {
|
110 |
+
wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', __( 'Facebook Page Plugin Shortcode Generator', 'facebook-page-feed-graph-api' ), 'facebook_page_plugin_dashboard_widget_callback' );
|
111 |
}
|
112 |
|
113 |
function facebook_page_plugin_dashboard_widget_callback() {
|
123 |
$langs = NULL;
|
124 |
}
|
125 |
echo '<form>';
|
126 |
+
echo '<p><label>' . __( 'Facebook Page URL', 'facebook-page-feed-graph-api' ) . ': <input type="url" id="fbpp-href" /></label></p>';
|
127 |
+
echo '<p><label>' . __( 'Width (pixels)', 'facebook-page-feed-graph-api' ) . ': <input type="number" max="500" min="180" id="fbpp-width" /></label></p>';
|
128 |
+
echo '<p><label>' . __( 'Height (pixels)', 'facebook-page-feed-graph-api' ) . ': <input type="number" min="70" id="fbpp-height" /></label></p>';
|
129 |
+
echo '<p><label>' . __( 'Show Cover Photo', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-cover" /></label></p>';
|
130 |
+
echo '<p><label>' . __( 'Show Facepile', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-facepile" /></label></p>';
|
131 |
+
echo '<p><label>' . __( 'Page Tabs (formerly posts)', 'facebook-page-feed-graph-api' ) . ': <select id="fbpp-posts"><option value="">None</option><option value="timeline">Timeline</option><option value="messages">Messages</option><option value="timeline,messages">Timeline, Messages</option><option value="messages,timeline">Messages, Timeline</option></select></label></p>';
|
132 |
+
echo '<p><label>' . __( 'Hide Call To Action', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-cta" /></label></p>';
|
133 |
+
echo '<p><label>' . __( 'Small Header', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-small" /></label></p>';
|
134 |
+
echo '<p><label>' . __( 'Adaptive Width', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-adapt" checked /></label></p>';
|
135 |
+
echo '<p><label>' . __( 'Display link while loading', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-link" checked /></label></p>';
|
136 |
+
echo '<p><label>' . __( 'Link text', 'facebook-page-feed-graph-api' ) . ': <input type="text" id="fbpp-linktext" /></label></p>';
|
137 |
+
echo '<p><label>' . __( 'Language', 'facebook-page-feed-graph-api' ) . ': <select id="fbpp-lang" /><option value="">' . __( 'Site Language', 'facebook-page-feed-graph-api' ) . '</option>';
|
138 |
if(isset($langs) && !empty($langs)){
|
139 |
foreach($langs as $lang){
|
140 |
+
//echo '<option value="' . $lang->codes->code->standard->representation . '">' . __( $lang->englishName, 'facebook-page-feed-graph-api' ) . '</option>'; // This is for Facebook loaded only
|
141 |
+
echo '<option value="' . $lang->standard->representation . '">' . __( $lang->englishName, 'facebook-page-feed-graph-api' ) . '</option>';
|
142 |
}
|
143 |
}
|
144 |
echo '</label></p>';
|
156 |
private $facebookURLs = array('https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/');
|
157 |
|
158 |
function __construct() {
|
159 |
+
parent::__construct( 'facebook_page_plugin_widget', __( 'Facebook Page Plugin', 'facebook-page-feed-graph-api' ), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ), ) );
|
160 |
}
|
161 |
public function widget( $args, $instance ) {
|
162 |
+
if( isset( $instance['title'] ) && !empty( $instance['title'] ) ) {
|
163 |
+
$title = apply_filters( 'widget_title', $instance['title'] );
|
164 |
+
} else {
|
165 |
+
$title = NULL;
|
166 |
+
}
|
167 |
if(isset($instance['href']) && !empty($instance['href'])){
|
168 |
$href = $instance['href'];
|
169 |
foreach($this->facebookURLs as $url){
|
192 |
} else {
|
193 |
$facepile = 'false';
|
194 |
}
|
195 |
+
if(isset($instance['tabs']) && !empty($instance['tabs'])){
|
196 |
+
$tabs = $instance['tabs'];
|
197 |
} else {
|
198 |
+
$tabs = '';
|
199 |
}
|
200 |
if(isset($instance['cta']) && !empty($instance['cta'])){
|
201 |
$cta = 'true';
|
212 |
} else {
|
213 |
$adapt = 'false';
|
214 |
}
|
215 |
+
if(isset($instance['link']) && !empty($instance['link'])){
|
216 |
+
$link = 'true';
|
217 |
+
} else {
|
218 |
+
$link = 'false';
|
219 |
+
}
|
220 |
+
if(isset($instance['linktext']) && !empty($instance['linktext'])){
|
221 |
+
$linktext = $instance['linktext'];
|
222 |
+
} else {
|
223 |
+
$linktext = NULL;
|
224 |
+
}
|
225 |
if(isset($instance['language']) && !empty($instance['language'])){
|
226 |
$language = $instance['language'];
|
227 |
} else {
|
233 |
}
|
234 |
if( !empty($href )){
|
235 |
$shortcode = '[facebook-page-plugin href="' . $href . '"';
|
236 |
+
if( isset( $width ) && !empty( $width ) ){
|
237 |
$shortcode .= ' width="' . $width . '"';
|
238 |
}
|
239 |
+
if( isset( $height ) && !empty( $height ) ){
|
240 |
$shortcode .= ' height="' . $height . '"';
|
241 |
}
|
242 |
+
if( isset( $cover ) && !empty( $cover ) ){
|
243 |
$shortcode .= ' cover="' . $cover . '"';
|
244 |
}
|
245 |
+
if( isset( $facepile ) && !empty( $facepile ) ){
|
246 |
$shortcode .= ' facepile="' . $facepile . '"';
|
247 |
}
|
248 |
+
if( isset( $tabs ) && !empty( $tabs ) ){
|
249 |
+
$shortcode .= ' tabs="' . $tabs . '"';
|
250 |
}
|
251 |
+
if( isset( $language ) && !empty( $language ) ){
|
252 |
$shortcode .= ' language="' . $language . '"';
|
253 |
}
|
254 |
+
if( isset( $cta ) && !empty( $cta ) ){
|
255 |
$shortcode .= ' cta="' . $cta . '"';
|
256 |
}
|
257 |
+
if( isset( $small ) && !empty( $small ) ){
|
258 |
$shortcode .= ' small="' . $small . '"';
|
259 |
}
|
260 |
+
if( isset( $adapt ) && !empty( $adapt ) ){
|
261 |
$shortcode .= ' adapt="' . $adapt . '"';
|
262 |
}
|
263 |
+
if( isset( $link ) && !empty( $link ) ){
|
264 |
+
$shortcode .= ' link="' . $link . '"';
|
265 |
+
}
|
266 |
+
if( isset( $linktext ) && !empty( $linktext ) ){
|
267 |
+
$shortcode .= ' linktext="' . $linktext . '"';
|
268 |
+
}
|
269 |
$shortcode .= ']';
|
270 |
echo do_shortcode( $shortcode );
|
271 |
}
|
302 |
} else {
|
303 |
$facepile = 'false';
|
304 |
}
|
305 |
+
if ( isset( $instance[ 'tabs' ] ) ) {
|
306 |
+
$tabs = $instance[ 'tabs' ];
|
307 |
} else {
|
308 |
+
$tabs = '';
|
309 |
}
|
310 |
if ( isset( $instance[ 'cta' ] ) ) {
|
311 |
$cta = $instance[ 'cta' ];
|
322 |
} else {
|
323 |
$adapt = 'true';
|
324 |
}
|
325 |
+
if ( isset( $instance[ 'link' ] ) ) {
|
326 |
+
$link = $instance[ 'link' ];
|
327 |
+
} else {
|
328 |
+
$link = 'true';
|
329 |
+
}
|
330 |
+
if ( isset( $instance[ 'linktext' ] ) ) {
|
331 |
+
$linktext = $instance[ 'linktext' ];
|
332 |
+
} else {
|
333 |
+
$linktext = '';
|
334 |
+
}
|
335 |
if ( isset( $instance[ 'language' ] ) ) {
|
336 |
$language = $instance[ 'language' ];
|
337 |
} else {
|
340 |
try {
|
341 |
//$lang_xml = file_get_contents('https://www.facebook.com/translations/FacebookLocales.xml');
|
342 |
$lang_xml = file_get_contents( plugin_dir_url( __FILE__ ) . 'lang.xml');
|
343 |
+
} catch( Exception $ex ) {
|
344 |
$lang_xml = NULL;
|
345 |
}
|
346 |
if(isset($lang_xml) && !empty($lang_xml)){
|
350 |
}
|
351 |
echo '<p>';
|
352 |
echo '<label for="' . $this->get_field_id( 'title' ) . '">';
|
353 |
+
_e( 'Title:', 'facebook-page-feed-graph-api' );
|
354 |
echo '</label>';
|
355 |
echo '<input class="widefat" id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . esc_attr( $title ) . '" />';
|
356 |
echo '</p>';
|
357 |
echo '<p>';
|
358 |
echo '<label for="' . $this->get_field_id( 'href' ) . '">';
|
359 |
+
_e( 'Page URL:', 'facebook-page-feed-graph-api' );
|
360 |
echo '</label>';
|
361 |
echo '<input class="widefat" id="' . $this->get_field_id( 'href' ) . '" name="' . $this->get_field_name( 'href' ) . '" type="url" value="' . esc_attr( $href ) . '" required />';
|
362 |
echo '</p>';
|
363 |
echo '<p>';
|
364 |
echo '<label for="' . $this->get_field_id( 'width' ) . '">';
|
365 |
+
_e( 'Width:', 'facebook-page-feed-graph-api' );
|
366 |
echo '</label>';
|
367 |
echo '<input class="widefat" id="' . $this->get_field_id( 'width' ) . '" name="' . $this->get_field_name( 'width' ) . '" type="number" min="180" max="500" value="' . esc_attr( $width ) . '" />';
|
368 |
echo '</p>';
|
369 |
echo '<p>';
|
370 |
echo '<label for="' . $this->get_field_id( 'height' ) . '">';
|
371 |
+
_e( 'Height:', 'facebook-page-feed-graph-api' );
|
372 |
echo '</label>';
|
373 |
echo '<input class="widefat" id="' . $this->get_field_id( 'height' ) . '" name="' . $this->get_field_name( 'height' ) . '" type="number" min="70" value="' . esc_attr( $height ) . '" />';
|
374 |
echo '</p>';
|
375 |
echo '<p>';
|
376 |
echo '<label for="' . $this->get_field_id( 'cover' ) . '">';
|
377 |
+
_e( 'Cover Photo:', 'facebook-page-feed-graph-api' );
|
378 |
echo '</label>';
|
379 |
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 ) . ' />';
|
380 |
echo '</p>';
|
381 |
echo '<p>';
|
382 |
echo '<label for="' . $this->get_field_id( 'facepile' ) . '">';
|
383 |
+
_e( 'Show Facepile:', 'facebook-page-feed-graph-api' );
|
384 |
echo '</label>';
|
385 |
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 ) . ' />';
|
386 |
echo '</p>';
|
387 |
echo '<p>';
|
388 |
+
echo '<label for="' . $this->get_field_id( 'tabs' ) . '">';
|
389 |
+
_e( 'Page Tabs:', 'facebook-page-feed-graph-api' );
|
390 |
echo '</label>';
|
391 |
+
echo ' <select class="widefat" id="' . $this->get_field_id( 'tabs' ) . '" name="' . $this->get_field_name( 'tabs' ) . ' "><option value="" ' . selected( esc_attr( $tabs ), "", false ) . '>None</option><option value="timeline"' . selected( esc_attr( $tabs ), "timeline", false ) . '>Timeline</option><option value="messages"' . selected( esc_attr( $tabs ), "messages", false ) . '>Messages</option><option value="timeline,messages"' . selected( esc_attr( $tabs ), "timeline,messages", false ) . '>Timeline, Messages</option><option value="messages,timeline"' . selected( esc_attr( $tabs ), "messages,timeline", false ) . '>Messages, Timeline</option></select>';
|
392 |
echo '</p>';
|
393 |
echo '<p>';
|
394 |
echo '<label for="' . $this->get_field_id( 'cta' ) . '">';
|
395 |
+
_e( 'Hide Call To Action:', 'facebook-page-feed-graph-api' );
|
396 |
echo '</label>';
|
397 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'cta' ) . '" name="' . $this->get_field_name( 'cta' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $cta ), 'true', false ) . ' />';
|
398 |
echo '</p>';
|
399 |
echo '<p>';
|
400 |
echo '<label for="' . $this->get_field_id( 'small' ) . '">';
|
401 |
+
_e( 'Small Header:', 'facebook-page-feed-graph-api' );
|
402 |
echo '</label>';
|
403 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'small' ) . '" name="' . $this->get_field_name( 'small' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $small ), 'true', false ) . ' />';
|
404 |
echo '</p>';
|
405 |
echo '<p>';
|
406 |
echo '<label for="' . $this->get_field_id( 'adapt' ) . '">';
|
407 |
+
_e( 'Adaptive Width:', 'facebook-page-feed-graph-api' );
|
408 |
echo '</label>';
|
409 |
echo ' <input class="widefat" id="' . $this->get_field_id( 'adapt' ) . '" name="' . $this->get_field_name( 'adapt' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $adapt ), 'true', false ) . ' />';
|
410 |
+
echo '</p>';
|
411 |
+
echo '<p>';
|
412 |
+
echo '<label for="' . $this->get_field_id( 'link' ) . '">';
|
413 |
+
_e( 'Display link while loading:', 'facebook-page-feed-graph-api' );
|
414 |
+
echo '</label>';
|
415 |
+
echo ' <input class="widefat" id="' . $this->get_field_id( 'link' ) . '" name="' . $this->get_field_name( 'link' ) . '" type="checkbox" value="true" ' . checked( esc_attr( $link ), 'true', false ) . ' />';
|
416 |
+
echo '</p>';
|
417 |
+
echo '<p>';
|
418 |
+
echo '<label for="' . $this->get_field_id( 'linktext' ) . '">';
|
419 |
+
_e( 'Link text:', 'facebook-page-feed-graph-api' );
|
420 |
+
echo '</label>';
|
421 |
+
echo '<input class="widefat" id="' . $this->get_field_id( 'linktext' ) . '" name="' . $this->get_field_name( 'linktext' ) . '" type="text" value="' . esc_attr( $linktext ) . '" />';
|
422 |
echo '</p>';
|
423 |
echo '<p>';
|
424 |
echo '<label for="' . $this->get_field_id( 'language' ) . '">';
|
425 |
+
_e( 'Language:', 'facebook-page-feed-graph-api' );
|
426 |
echo '</label>';
|
427 |
echo '<select class="widefat" id="' . $this->get_field_id( 'language' ) . '" name="' . $this->get_field_name( 'language' ) . '">';
|
428 |
+
echo '<option value="">' . __( 'Site Language (default)', 'facebook-page-feed-graph-api' ) . '</option>';
|
429 |
if(isset($langs) && !empty($langs)){
|
430 |
foreach($langs as $lang){
|
431 |
+
//echo '<option value="' . $lang->codes->code->standard->representation . '"' . selected( esc_attr( $language ), $lang->codes->code->standard->representation, false ) . '>' . __( $lang->englishName, 'facebook-page-feed-graph-api' ) . '</option>'; // Facebook only
|
432 |
+
echo '<option value="' . $lang->standard->representation . '"' . selected( esc_attr( $language ), $lang->standard->representation, false ) . '>' . __( $lang->englishName, 'facebook-page-feed-graph-api' ) . '</option>';
|
433 |
}
|
434 |
}
|
435 |
echo '</select>';
|
445 |
$instance['height'] = ( ! empty( $new_instance['height'] ) ) ? strip_tags( $new_instance['height'] ) : '';
|
446 |
$instance['cover'] = ( ! empty( $new_instance['cover'] ) ) ? strip_tags( $new_instance['cover'] ) : '';
|
447 |
$instance['facepile'] = ( ! empty( $new_instance['facepile'] ) ) ? strip_tags( $new_instance['facepile'] ) : '';
|
448 |
+
$instance['tabs'] = ( ! empty( $new_instance['tabs'] ) ) ? strip_tags( $new_instance['tabs'] ) : '';
|
449 |
$instance['cta'] = ( ! empty( $new_instance['cta'] ) ) ? strip_tags( $new_instance['cta'] ) : '';
|
450 |
$instance['small'] = ( ! empty( $new_instance['small'] ) ) ? strip_tags( $new_instance['small'] ) : '';
|
451 |
$instance['adapt'] = ( ! empty( $new_instance['adapt'] ) ) ? strip_tags( $new_instance['adapt'] ) : '';
|
452 |
+
$instance['link'] = ( ! empty( $new_instance['link'] ) ) ? strip_tags( $new_instance['link'] ) : '';
|
453 |
+
$instance['linktext'] = ( ! empty( $new_instance['linktext'] ) ) ? strip_tags( $new_instance['linktext'] ) : '';
|
454 |
$instance['language'] = ( ! empty( $new_instance['language'] ) ) ? strip_tags( $new_instance['language'] ) : '';
|
455 |
return $instance;
|
456 |
}
|
468 |
global $current_user ;
|
469 |
$user_id = $current_user->ID;
|
470 |
if ( !get_user_meta( $user_id, 'facebook_page_plugin_admin_notice_ignore' ) || get_user_meta( $user_id, 'facebook_page_plugin_admin_notice_ignore' ) === false ) {
|
471 |
+
echo '<div class="updated" id="facebook-page-plugin-review"><p>';
|
472 |
+
echo __( 'Thank you for using the Facebook Page Plugin. If you enjoy using it, please take the time to', 'facebook-page-feed-graph-api' ) . ' <a href="https://wordpress.org/support/view/plugin-reviews/facebook-page-feed-graph-api?rate=5#postform" target="_blank">' . __( 'leave a review', 'facebook-page-feed-graph-api' ) . '</a>. ' . __( 'Thanks', 'facebook-page-feed-graph-api' );
|
473 |
+
echo '<a href="?facebook_page_plugin_admin_notice_ignore=0" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice', 'facebook-page-feed-graph-api' ) . '.</span></a></p></div>';
|
474 |
}
|
475 |
}
|
476 |
}
|
482 |
update_user_meta($user_id, 'facebook_page_plugin_admin_notice_ignore', 'true', true);
|
483 |
}
|
484 |
}
|
485 |
+
|
486 |
+
function facebook_page_plugin_action_links( $links ) {
|
487 |
+
$links[] = '<a href="https://profiles.wordpress.org/cameronjonesweb/#content-plugins" target="_blank">More plugins by cameronjonesweb</a>';
|
488 |
+
return $links;
|
489 |
+
}
|
js/facebook-page-plugin-admin.js
CHANGED
@@ -33,6 +33,10 @@
|
|
33 |
$shortcode += 'small="' + $small + '" ';
|
34 |
var $adapt = $('#fbpp-adapt').prop("checked");
|
35 |
$shortcode += 'adapt="' + $adapt + '" ';
|
|
|
|
|
|
|
|
|
36 |
var $lang = $('#fbpp-lang').val();
|
37 |
if($lang.length > 0){
|
38 |
$shortcode += 'lang="' + $lang + '" ';
|
33 |
$shortcode += 'small="' + $small + '" ';
|
34 |
var $adapt = $('#fbpp-adapt').prop("checked");
|
35 |
$shortcode += 'adapt="' + $adapt + '" ';
|
36 |
+
var $link = $('#fbpp-link').prop("checked");
|
37 |
+
$shortcode += 'link="' + $link + '" ';
|
38 |
+
var $linktext = $('#fbpp-linktext').val();
|
39 |
+
$shortcode += 'linktext="' + $linktext + '" ';
|
40 |
var $lang = $('#fbpp-lang').val();
|
41 |
if($lang.length > 0){
|
42 |
$shortcode += 'lang="' + $lang + '" ';
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: facebook,social,like,facepile,activity feed,recommendations,shortcode,widg
|
|
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.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
@@ -40,10 +40,13 @@ If you like the plugin, please take the time to leave a review.
|
|
40 |
1. Download the latest version of Facebook Page Plugin
|
41 |
2. Extract the files
|
42 |
3. Upload the entire `facebook-page-feed-graph-api` folder to the `/wp-content/plugins/` directory.
|
43 |
-
|
44 |
4. Activate the plugin through the 'Plugins' menu in WordPress.
|
45 |
|
46 |
== Frequently Asked Questions ==
|
|
|
|
|
|
|
47 |
= How do I use the plugin? =
|
48 |
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.
|
49 |
|
@@ -63,7 +66,7 @@ Available settings:
|
|
63 |
|
64 |
`facepile` (true/false, show facepile, default true)
|
65 |
|
66 |
-
`
|
67 |
|
68 |
`cta` (true/false, hide custom call to action if applicable, default false)
|
69 |
|
@@ -73,8 +76,12 @@ Available settings:
|
|
73 |
|
74 |
`language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
|
75 |
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
|
79 |
= What languages are available? =
|
80 |
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.
|
@@ -89,7 +96,8 @@ Shortcodes were introduced in WordPress 2.5, so theorectially it should work on
|
|
89 |
= I can only see a link, the plugin won't load =
|
90 |
By default the plugin will display a link to your page while the page plugin loads. If the page plugin doesn't load, this could happen for a number of reasons. Your connection could be very slow, you could have JavaScript disabled, you could have an ad blocker or similar browser extension blocking the plugin or there could be an error in the information you have provided in the widget or shortcode.
|
91 |
|
92 |
-
|
|
|
93 |
|
94 |
== Screenshots ==
|
95 |
1. Installation example
|
@@ -97,60 +105,90 @@ By default the plugin will display a link to your page while the page plugin loa
|
|
97 |
3. The new shortcode generator dashboard widget
|
98 |
|
99 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
= 1.3.4 =
|
101 |
* Fixed typo in widget
|
102 |
* Fixed labels in widget
|
103 |
* Changed languages to load from a local file instead of Facebook's Locales XML file. This fixes the issue where approximately 40 languages were supported by Facebook but not for the page plugin, and also users working locally without internet access are now able to change the language from default.
|
104 |
* Re-introduced App ID, while it should not be needed it appears that removing it has affected some sites.
|
|
|
105 |
= 1.3.3 =
|
106 |
* Direct access security update
|
107 |
* Verifying compatibility with WP 4.2.4 and WP 4.3
|
108 |
* Fixing bug where some options in the widget would revert to the default instead of false
|
|
|
109 |
= 1.3.2 =
|
110 |
* WP 4.2.3 Compatibility
|
111 |
* Upgrading to Graph API 2.4
|
|
|
112 |
= 1.3.0 =
|
113 |
* Added hide-cta, small-header and adapt-container-width settings
|
114 |
* Adjusted min height and width
|
|
|
115 |
= 1.2.5 =
|
116 |
* Fixed close icon on notice
|
|
|
117 |
= 1.2.4 =
|
118 |
* Fixed readme
|
|
|
119 |
= 1.2.3 =
|
120 |
* Fixed bug where the admin dashboard and widgets pages would break if the WordPress installation is running on localhost and there is no internet connection
|
|
|
121 |
= 1.2.2 =
|
122 |
* Fixed posts option for widget
|
|
|
123 |
= 1.2.1 =
|
124 |
* Fixed readme bug
|
|
|
125 |
= 1.2.0 =
|
126 |
* Added multilingual support. Language can be specified in the shortcode, otherwise it is retrievd from the site settings.
|
127 |
* Added a shortcode generator dashboard widget to allow easier creation of the shortcode
|
128 |
* Added a custom widget
|
|
|
129 |
= 1.1.1 =
|
130 |
* Fixed height bug
|
|
|
131 |
= 1.1.0 =
|
132 |
* Added filter to allow calling of shortcodes in the text widget
|
|
|
133 |
= 1.0.3 =
|
134 |
* Fixing screenshot issue
|
|
|
135 |
= 1.0.1 =
|
136 |
* Cleaning up readme file
|
|
|
137 |
= 1.0 =
|
138 |
* Initial release
|
139 |
|
140 |
== Upgrade Notice ==
|
|
|
|
|
|
|
|
|
141 |
= 1.3.3 =
|
142 |
This version includes increased security measures and fixes a bug where some widget options would not work properly. Please upgrade immediately.
|
|
|
143 |
= 1.3.0 =
|
144 |
This version adds new settings. Please update for the best possible experience.
|
|
|
145 |
= 1.2.3 =
|
146 |
This version fixes a bug where the admin dashboard and widgets pages would break if the WordPress installation is running on localhost and there is no internet connection. While not imperative to most sites it is recommended that you update if you work on a localhost or virtual machine
|
|
|
147 |
= 1.2.2 =
|
148 |
This version addresses a fix for the posts option not working in the widget. Please update immediately.
|
|
|
149 |
= 1.2.0 =
|
150 |
This version includes multilingual support, a custom widget and a shortcode generator on the admin dashboard. It is highly recommended that you update.
|
|
|
151 |
= 1.1.1 =
|
152 |
Fixed height bug where height would only ever be the same value as width. Update immediately.
|
|
|
153 |
= 1.1.0 =
|
154 |
Added filter to allow calling of shortcodes in the text widget
|
155 |
-
= 1.0.0 =
|
156 |
-
Initial release
|
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.3
|
7 |
+
Stable tag: 1.4.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
10 |
|
40 |
1. Download the latest version of Facebook Page Plugin
|
41 |
2. Extract the files
|
42 |
3. Upload the entire `facebook-page-feed-graph-api` folder to the `/wp-content/plugins/` directory.
|
43 |
+
|
44 |
4. Activate the plugin through the 'Plugins' menu in WordPress.
|
45 |
|
46 |
== Frequently Asked Questions ==
|
47 |
+
= What happened to "Show Posts"? =
|
48 |
+
The latest version of the API has removed show posts and replaced it with `tabs` which is more dynamic. To show just the posts, your tabs value should be "timeline". To hide the posts, `tabs` should be empty (shortcode) or select "none" (widget). If you're using the shortcode, remember that by default it shows the timeline so you must set it as either an empty or false value to hide posts ie `tabs=""` or `tabs="false"`. If the posts option is already being used it will be converted to tabs.
|
49 |
+
|
50 |
= How do I use the plugin? =
|
51 |
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.
|
52 |
|
66 |
|
67 |
`facepile` (true/false, show facepile, default true)
|
68 |
|
69 |
+
`tabs` (timeline,messages or a combination of both, display page posts and/or private messages between the page and the logged in user viewing the page, default timeline)
|
70 |
|
71 |
`cta` (true/false, hide custom call to action if applicable, default false)
|
72 |
|
76 |
|
77 |
`language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
|
78 |
|
79 |
+
* Deprecated Settings *
|
80 |
+
|
81 |
+
`posts` (true/false) - posts has been replaced by tabs as of 1.4.0. There is a fallback in place to convert it to tabs
|
82 |
+
|
83 |
+
Example: `[facebook-page-plugin href="facebook" width="300" height="500" cover="true" facepile="true" tabs="timeline" adapt="true"]`
|
84 |
+
This will display a Facebook page feed that loads in the page `facebook.com/facebook` that is 300px wide but adapts to it's container, 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
|
85 |
|
86 |
= What languages are available? =
|
87 |
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.
|
96 |
= I can only see a link, the plugin won't load =
|
97 |
By default the plugin will display a link to your page while the page plugin loads. If the page plugin doesn't load, this could happen for a number of reasons. Your connection could be very slow, you could have JavaScript disabled, you could have an ad blocker or similar browser extension blocking the plugin or there could be an error in the information you have provided in the widget or shortcode.
|
98 |
|
99 |
+
= I can't get the Facepile to work! =
|
100 |
+
Chances are your plugin isn't tall enough to display the facepile properly. The facepile requires the plugin to have a minimum height of 214 pixels, or 154 pixel if using the small header.
|
101 |
|
102 |
== Screenshots ==
|
103 |
1. Installation example
|
105 |
3. The new shortcode generator dashboard widget
|
106 |
|
107 |
== Changelog ==
|
108 |
+
|
109 |
+
= 1.4.0 =
|
110 |
+
* Options to remove and customise the page link that displays while the plugin loads
|
111 |
+
* Fixed `undefined index` error when adding a new instance of the plugin in the customizer
|
112 |
+
* Updated all admin text to be multi-lingual compatible
|
113 |
+
* Updated `posts` option to `tabs`
|
114 |
+
* Updated screenshots and example
|
115 |
+
|
116 |
= 1.3.4 =
|
117 |
* Fixed typo in widget
|
118 |
* Fixed labels in widget
|
119 |
* Changed languages to load from a local file instead of Facebook's Locales XML file. This fixes the issue where approximately 40 languages were supported by Facebook but not for the page plugin, and also users working locally without internet access are now able to change the language from default.
|
120 |
* Re-introduced App ID, while it should not be needed it appears that removing it has affected some sites.
|
121 |
+
|
122 |
= 1.3.3 =
|
123 |
* Direct access security update
|
124 |
* Verifying compatibility with WP 4.2.4 and WP 4.3
|
125 |
* Fixing bug where some options in the widget would revert to the default instead of false
|
126 |
+
|
127 |
= 1.3.2 =
|
128 |
* WP 4.2.3 Compatibility
|
129 |
* Upgrading to Graph API 2.4
|
130 |
+
|
131 |
= 1.3.0 =
|
132 |
* Added hide-cta, small-header and adapt-container-width settings
|
133 |
* Adjusted min height and width
|
134 |
+
|
135 |
= 1.2.5 =
|
136 |
* Fixed close icon on notice
|
137 |
+
|
138 |
= 1.2.4 =
|
139 |
* Fixed readme
|
140 |
+
|
141 |
= 1.2.3 =
|
142 |
* Fixed bug where the admin dashboard and widgets pages would break if the WordPress installation is running on localhost and there is no internet connection
|
143 |
+
|
144 |
= 1.2.2 =
|
145 |
* Fixed posts option for widget
|
146 |
+
|
147 |
= 1.2.1 =
|
148 |
* Fixed readme bug
|
149 |
+
|
150 |
= 1.2.0 =
|
151 |
* Added multilingual support. Language can be specified in the shortcode, otherwise it is retrievd from the site settings.
|
152 |
* Added a shortcode generator dashboard widget to allow easier creation of the shortcode
|
153 |
* Added a custom widget
|
154 |
+
|
155 |
= 1.1.1 =
|
156 |
* Fixed height bug
|
157 |
+
|
158 |
= 1.1.0 =
|
159 |
* Added filter to allow calling of shortcodes in the text widget
|
160 |
+
|
161 |
= 1.0.3 =
|
162 |
* Fixing screenshot issue
|
163 |
+
|
164 |
= 1.0.1 =
|
165 |
* Cleaning up readme file
|
166 |
+
|
167 |
= 1.0 =
|
168 |
* Initial release
|
169 |
|
170 |
== Upgrade Notice ==
|
171 |
+
|
172 |
+
= 1.4.0 =
|
173 |
+
The `posts` option has been removed and replaced by `tabs`. If you are upgrading to 1.4.0, please adjust your shortcodes and widgets accordingly.
|
174 |
+
|
175 |
= 1.3.3 =
|
176 |
This version includes increased security measures and fixes a bug where some widget options would not work properly. Please upgrade immediately.
|
177 |
+
|
178 |
= 1.3.0 =
|
179 |
This version adds new settings. Please update for the best possible experience.
|
180 |
+
|
181 |
= 1.2.3 =
|
182 |
This version fixes a bug where the admin dashboard and widgets pages would break if the WordPress installation is running on localhost and there is no internet connection. While not imperative to most sites it is recommended that you update if you work on a localhost or virtual machine
|
183 |
+
|
184 |
= 1.2.2 =
|
185 |
This version addresses a fix for the posts option not working in the widget. Please update immediately.
|
186 |
+
|
187 |
= 1.2.0 =
|
188 |
This version includes multilingual support, a custom widget and a shortcode generator on the admin dashboard. It is highly recommended that you update.
|
189 |
+
|
190 |
= 1.1.1 =
|
191 |
Fixed height bug where height would only ever be the same value as width. Update immediately.
|
192 |
+
|
193 |
= 1.1.0 =
|
194 |
Added filter to allow calling of shortcodes in the text widget
|
|
|
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|