Responsive Facebook Page Plugin - Version 1.8.0

Version Description

  • 20/11/20 =
  • Updated SDK version
  • Verified compatibility with WordPress 5.5
  • Updated supported locales (RIP Pirate English)
  • Added iframe embed option
Download this release

Release Info

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

Code changes from version 1.7.3 to 1.8.0

Files changed (9) hide show
  1. facebook-page-feed-graph-api.php +427 -276
  2. inc/landing-page.php +32 -24
  3. js/admin-global.js +88 -84
  4. js/responsive.js +51 -38
  5. js/responsive.min.js +1 -1
  6. js/sdk.js +22 -1
  7. lang.xml +0 -572
  8. readme.md +15 -7
  9. readme.txt +21 -21
facebook-page-feed-graph-api.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mongoose Page Plugin
4
  * Plugin URI: https://mongoosemarketplace.com/downloads/facebook-page-plugin/
5
  * Description: The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 95 different languages
6
- * Version: 1.7.3
7
  * Author: Mongoose Marketplace
8
  * Author URI: https://mongoosemarketplace.com/
9
  * License: GPLv2
@@ -27,18 +27,131 @@ class cameronjonesweb_facebook_page_plugin {
27
 
28
  public static $remove_donate_notice_key = 'facebook_page_plugin_donate_notice_ignore';
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  public function __construct() {
31
 
32
  define( 'CJW_FBPP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
33
  define( 'CJW_FBPP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
34
  define( 'CJW_FBPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
35
- define( 'CJW_FBPP_PLUGIN_VER', '1.7.3' );
36
  define( 'CJW_FBPP_PLUGIN_DONATE_LINK', 'https://www.patreon.com/cameronjonesweb' );
37
  define( 'CJW_FBPP_PLUGIN_SURVEY_LINK', 'https://cameronjonesweb.typeform.com/to/BllbYm' );
38
 
39
  // Add all the hooks and actions.
40
  add_shortcode( 'facebook-page-plugin', array( $this, 'facebook_page_plugin' ) );
41
- add_filter( 'widget_text', 'do_shortcode' );
42
  add_action( 'wp_dashboard_setup', array( $this, 'facebook_page_plugin_dashboard_widget' ) );
43
  add_action( 'admin_enqueue_scripts', array( $this, 'facebook_page_plugin_admin_resources' ) );
44
  add_action( 'admin_init', array( $this, 'remove_donate_notice_nojs' ) );
@@ -46,39 +159,39 @@ class cameronjonesweb_facebook_page_plugin {
46
  add_action( 'wp_ajax_facebook_page_plugin_latest_blog_posts_callback', array( $this, 'facebook_page_plugin_latest_blog_posts_callback' ) );
47
  add_action( 'activated_plugin', array( $this, 'facebook_page_plugin_activation_hook' ) );
48
  add_action( 'wp_ajax_facebook_page_plugin_remove_donate_notice', array( $this, 'remove_donate_notice' ) );
 
 
 
49
  add_filter( 'plugin_action_links_' . CJW_FBPP_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
50
 
51
  }
52
 
53
 
54
- // Filter functions.
 
 
55
  private static function dashboard_widget_capability() {
56
-
57
  $return = apply_filters( 'facebook_page_plugin_dashboard_widget_capability', 'edit_posts' );
58
  return $return;
59
-
60
  }
61
 
62
 
63
  private static function app_id() {
64
-
65
  $return = apply_filters( 'facebook_page_plugin_app_id', '846690882110183' );
66
  return $return;
67
-
68
  }
69
 
70
 
71
  // Admin functions.
72
-
73
  public static function donate_notice() {
74
 
75
- $return = NULL;
76
 
77
- if( current_user_can( 'administrator' ) ) {
78
 
79
  $user_id = get_current_user_id();
80
 
81
- if ( !get_user_meta( $user_id, self::$remove_donate_notice_key ) || get_user_meta( $user_id, self::$remove_donate_notice_key ) === false ) {
82
 
83
  $return .= '<div class="facebook-page-plugin-donate"><p>';
84
 
@@ -106,7 +219,7 @@ class cameronjonesweb_facebook_page_plugin {
106
 
107
  update_user_meta( $user_id, self::$remove_donate_notice_key, 'true', true );
108
 
109
- if( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
110
 
111
  wp_die();
112
 
@@ -135,24 +248,37 @@ class cameronjonesweb_facebook_page_plugin {
135
  return $links;
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
- //Enqueue CSS and JS for admin
 
 
140
  public function facebook_page_plugin_admin_resources() {
141
-
142
- wp_enqueue_script( 'facebook-page-plugin-admin-scripts', CJW_FBPP_PLUGIN_URL . 'js/admin-global.js' );
143
- wp_enqueue_style( 'facebook-page-plugin-admin-styles', CJW_FBPP_PLUGIN_URL . 'css/admin-global.css' );
144
 
145
  }
146
 
147
- //Register the dashboard widget
 
 
148
  public function facebook_page_plugin_dashboard_widget() {
149
-
150
- if( current_user_can( self::dashboard_widget_capability() ) ) {
151
-
152
  wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', __( 'Mongoose Page Plugin Shortcode Generator', 'facebook-page-feed-graph-api' ), array( $this, 'facebook_page_plugin_dashboard_widget_callback' ) );
153
-
154
  }
155
-
156
  }
157
 
158
  //Load the dashboard widget
@@ -160,7 +286,6 @@ class cameronjonesweb_facebook_page_plugin {
160
  echo '<a name="cameronjonesweb_facebook_page_plugin_shortcode_generator"></a>';
161
  $generator = new cameronjonesweb_facebook_page_plugin_shortcode_generator();
162
  $generator->generate();
163
-
164
  }
165
 
166
  function facebook_page_plugin_landing_page_menu() {
@@ -168,9 +293,9 @@ class cameronjonesweb_facebook_page_plugin {
168
  }
169
 
170
  function facebook_page_plugin_landing_page() {
171
- wp_enqueue_style( 'facebook-page-plugin-landing-page-css', CJW_FBPP_PLUGIN_URL . 'css/admin-landing-page.css', [], CJW_FBPP_PLUGIN_VER );
172
- wp_enqueue_style( 'facebook-page-plugin-google-fonts', 'https://fonts.googleapis.com/css?family=Rammetto+One|Paytone+One|Space+Mono:400|Muli:400,400i,700', [], CJW_FBPP_PLUGIN_VER );
173
- wp_enqueue_script( 'facebook-page-plugin-landing-page-js', CJW_FBPP_PLUGIN_URL . 'js/admin-landing-page.js', array( 'jquery' ), CJW_FBPP_PLUGIN_VER, true );
174
  include CJW_FBPP_PLUGIN_DIR . '/inc/landing-page.php';
175
  }
176
 
@@ -180,12 +305,12 @@ class cameronjonesweb_facebook_page_plugin {
180
  __( 'Developer\'s blog', 'facebook-page-feed-graph-api' ),
181
  __( 'Latest plugin news', 'facebook-page-feed-graph-api' )
182
  );
183
- wp_widget_rss_output( 'https://feed.rssunify.com/5b718c594e800/rss.xml', [ 'show_date' => 1 ] );
184
  wp_die( $links );
185
  }
186
 
187
  function facebook_page_plugin_activation_hook( $plugin ) {
188
- if( $plugin == CJW_FBPP_PLUGIN_BASENAME ) {
189
  exit( wp_redirect( admin_url( 'options-general.php?page=facebook-page-plugin' ) ) );
190
  }
191
  }
@@ -193,7 +318,7 @@ class cameronjonesweb_facebook_page_plugin {
193
 
194
  // Client side stuff.
195
  function facebook_page_plugin_generate_wrapper_id() {
196
- return substr( str_shuffle( str_repeat( implode( '', array_merge( range( 'A', 'Z' ), range( 'a', 'z' ) ) ), 5 ) ), 0, 15 );
197
  }
198
 
199
  /**
@@ -203,8 +328,7 @@ class cameronjonesweb_facebook_page_plugin {
203
  * @return string
204
  */
205
  public function facebook_page_plugin( $filter ) {
206
- wp_enqueue_script( 'facebook-page-plugin-sdk', CJW_FBPP_PLUGIN_URL . 'js/sdk.js', array(), CJW_FBPP_PLUGIN_VER, true );
207
- wp_enqueue_script( 'facebook-page-plugin-responsive-script', CJW_FBPP_PLUGIN_URL . 'js/responsive.min.js', 'jquery', CJW_FBPP_PLUGIN_VER, true );
208
  $return = '';
209
  $a = shortcode_atts(
210
  array(
@@ -221,6 +345,7 @@ class cameronjonesweb_facebook_page_plugin {
221
  'adapt' => null,
222
  'link' => true,
223
  'linktext' => null,
 
224
  '_implementation' => 'shortcode',
225
  ),
226
  $filter
@@ -228,89 +353,113 @@ class cameronjonesweb_facebook_page_plugin {
228
  if ( isset( $a['href'] ) && ! empty( $a['href'] ) ) {
229
  $a['language'] = str_replace( '-', '_', $a['language'] );
230
 
231
- // Send the language as a parameter to the SDK.
232
- wp_localize_script( 'facebook-page-plugin-sdk', 'facebook_page_plugin_language', array( 'language' => esc_attr( $a['language'] ) ) );
233
-
234
  $return .= sprintf(
235
- '<div class="cameronjonesweb_facebook_page_plugin" data-version="%1$s" data-implementation="%2$s" id="%3$s">',
236
  esc_attr( CJW_FBPP_PLUGIN_VER ),
237
  esc_attr( $a['_implementation'] ),
238
- esc_attr( $this->facebook_page_plugin_generate_wrapper_id() )
239
- );
240
- $return .= sprintf(
241
- '<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/' . $a['language'] . '/sdk.js#xfbml=1&version=v3.2&appId=%1$s";fjs.parentNode.insertBefore(js, fjs); }(document, \'script\', \'facebook-jssdk\'));</script>',
242
- esc_attr( self::app_id() )
243
- );
244
- $return .= sprintf(
245
- '<div class="fb-page" data-href="https://facebook.com/%1$s" ',
246
- esc_attr( $a['href'] )
247
  );
248
- if ( isset( $a['width'] ) && ! empty( $a['width'] ) ) {
249
- $return .= sprintf(
250
- ' data-width="%1$s" data-max-width="%1$s"',
251
- esc_attr( $a['width'] )
252
- );
253
- }
254
- if ( isset( $a['height'] ) && ! empty( $a['height'] ) ) {
255
  $return .= sprintf(
256
- ' data-height="%1$s"',
257
- esc_attr( $a['height'] )
258
  );
259
- }
260
- if ( isset( $a['cover'] ) && ! empty( $a['cover'] ) ) {
261
- if ( 'false' == $a['cover'] ) {
262
- $return .= ' data-hide-cover="true"';
263
- } elseif ( 'true' == $a['cover'] ) {
264
- $return .= ' data-hide-cover="false"';
265
  }
266
- }
267
- if ( isset( $a['facepile'] ) && ! empty( $a['facepile'] ) ) {
268
- $return .= ' data-show-facepile="' . $a['facepile'] . '"';
269
- }
270
- if ( isset( $a['tabs'] ) && ! empty( $a['tabs'] ) ) {
271
- $return .= sprintf(
272
- ' data-tabs="%1$s"',
273
- esc_attr( $a['tabs'] )
274
- );
275
- } elseif ( isset( $a['posts'] ) && ! empty( $a['posts'] ) ) {
276
- if ( 'true' == $a['posts'] ) {
277
- $return .= ' data-tabs="timeline"';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  } else {
279
- $return .= ' data-tabs="false"';
280
  }
281
- }
282
- if ( isset( $a['cta'] ) && ! empty( $a['cta'] ) ) {
283
- $return .= ' data-hide-cta="' . $a['cta'] . '"';
284
- $return .= sprintf(
285
- ' data-hide-cta="%1$s"',
286
- esc_attr( $a['cta'] )
287
- );
288
- }
289
- if ( isset( $a['small'] ) && ! empty( $a['small'] ) ) {
290
- $return .= sprintf(
291
- ' data-small-header="%1$s"',
292
- esc_attr( $a['small'] )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  );
294
- }
295
- if ( isset( $a['adapt'] ) && ! empty( $a['adapt'] ) ) {
296
- $return .= ' data-adapt-container-width="true"';
297
- } else {
298
- $return .= ' data-adapt-container-width="false"';
299
- }
300
- $return .= '><div class="fb-xfbml-parse-ignore">';
301
- if ( 'true' == $a['link'] ) {
302
  $return .= sprintf(
303
- '<blockquote cite="https://www.facebook.com/%1$s"><a href="https://www.facebook.com/%1$s">',
304
- esc_attr( $a['href'] )
 
 
305
  );
306
- if ( empty( $a['linktext'] ) ) {
307
- $return .= 'https://www.facebook.com/' . esc_attr( $a['href'] );
308
- } else {
309
- $return .= esc_html( $a['linktext'] );
310
- }
311
- $return .= '</a></blockquote>';
312
  }
313
- $return .= '</div></div></div>';
314
  }
315
  return $return;
316
  }
@@ -318,206 +467,221 @@ class cameronjonesweb_facebook_page_plugin {
318
  }
319
 
320
  class cameronjonesweb_facebook_page_plugin_widget extends WP_Widget {
321
-
322
- private $facebookURLs = array( 'https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/', 'http://facebook.com/', 'http://www.facebook.com/' );
323
  private $settings;
324
-
325
  function __construct() {
326
- $this->settings = new facebook_page_plugin_settings;
327
- parent::__construct( 'facebook_page_plugin_widget', __( 'Mongoose Page Plugin', 'facebook-page-feed-graph-api' ), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ), ) );
328
  }
 
329
  public function widget( $args, $instance ) {
330
- if( isset( $instance['title'] ) && !empty( $instance['title'] ) ) {
331
  $title = apply_filters( 'widget_title', $instance['title'] );
332
  } else {
333
- $title = NULL;
334
  }
335
- if(isset($instance['href']) && !empty($instance['href'])){
336
  $href = $instance['href'];
337
- foreach($this->facebookURLs as $url){
338
- $href = str_replace($url, '', $href);
339
  }
340
  } else {
341
- $href = NULL;
342
  }
343
- if(isset($instance['width']) && !empty($instance['width'])){
344
  $width = $instance['width'];
345
  } else {
346
- $width = NULL;
347
  }
348
- if(isset($instance['height']) && !empty($instance['height'])){
349
  $height = $instance['height'];
350
  } else {
351
- $height = NULL;
352
  }
353
- if(isset($instance['cover']) && !empty($instance['cover'])){
354
  $cover = 'true';
355
  } else {
356
  $cover = 'false';
357
  }
358
- if(isset($instance['facepile']) && !empty($instance['facepile'])){
359
  $facepile = 'true';
360
  } else {
361
  $facepile = 'false';
362
  }
363
- if(isset($instance['tabs']) && !empty($instance['tabs'])){
364
  $tabs = $instance['tabs'];
365
  } else {
366
  $tabs = '';
367
  }
368
- if(isset($instance['cta']) && !empty($instance['cta'])){
369
  $cta = 'true';
370
  } else {
371
  $cta = 'false';
372
  }
373
- if(isset($instance['small']) && !empty($instance['small'])){
374
  $small = 'true';
375
  } else {
376
  $small = 'false';
377
  }
378
- if(isset($instance['adapt']) && !empty($instance['adapt'])){
379
  $adapt = 'true';
380
  } else {
381
  $adapt = 'false';
382
  }
383
- if(isset($instance['link']) && !empty($instance['link'])){
384
  $link = 'true';
385
  } else {
386
  $link = 'false';
387
  }
388
- if(isset($instance['linktext']) && !empty($instance['linktext'])){
389
  $linktext = $instance['linktext'];
390
  } else {
391
- $linktext = NULL;
392
  }
393
- if(isset($instance['language']) && !empty($instance['language'])){
394
  $language = $instance['language'];
395
  } else {
396
- $language = NULL;
397
  }
398
- echo $args['before_widget'];
 
 
 
 
 
399
  if ( ! empty( $title ) ) {
400
- echo $args['before_title'] . $title . $args['after_title'];
401
  }
402
- if( !empty($href )){
403
  $shortcode = '[facebook-page-plugin href="' . $href . '"';
404
- if( isset( $width ) && !empty( $width ) ){
405
- $shortcode .= ' width="' . $width . '"';
406
  }
407
- if( isset( $height ) && !empty( $height ) ){
408
- $shortcode .= ' height="' . $height . '"';
409
  }
410
- if( isset( $cover ) && !empty( $cover ) ){
411
- $shortcode .= ' cover="' . $cover . '"';
412
  }
413
- if( isset( $facepile ) && !empty( $facepile ) ){
414
- $shortcode .= ' facepile="' . $facepile . '"';
415
  }
416
- if( isset( $tabs ) && !empty( $tabs ) ){
417
- if( is_array( $tabs ) ) {
418
  $shortcode .= ' tabs="';
419
- for( $i = 0; $i < count( $tabs ); $i++ ) {
420
- $shortcode .= $tabs[$i];
421
- $shortcode .= ( $i != count( $tabs ) - 1 ? ',' : '' );
422
  }
423
  $shortcode .= '"';
424
  } else {
425
- $shortcode .= ' tabs="' . $tabs . '"';
426
  }
427
  }
428
- if( isset( $language ) && !empty( $language ) ){
429
- $shortcode .= ' language="' . $language . '"';
 
 
 
430
  }
431
- if( isset( $cta ) && !empty( $cta ) ){
432
- $shortcode .= ' cta="' . $cta . '"';
433
  }
434
- if( isset( $small ) && !empty( $small ) ){
435
- $shortcode .= ' small="' . $small . '"';
436
  }
437
- if( isset( $adapt ) && !empty( $adapt ) ){
438
- $shortcode .= ' adapt="' . $adapt . '"';
439
  }
440
- if( isset( $link ) && !empty( $link ) ){
441
- $shortcode .= ' link="' . $link . '"';
442
  }
443
- if( isset( $linktext ) && !empty( $linktext ) ){
444
- $shortcode .= ' linktext="' . $linktext . '"';
445
  }
446
  $shortcode .= ' _implementation="widget"';
447
  $shortcode .= ']';
448
  echo do_shortcode( $shortcode );
449
  }
450
- echo $args['after_widget'];
451
- }
 
452
  public function form( $instance ) {
453
 
454
- if ( isset( $instance[ 'title' ] ) ) {
455
- $title = $instance[ 'title' ];
456
  } else {
457
  $title = __( 'New title', 'facebook-page-feed-graph-api' );
458
  }
459
- if ( isset( $instance[ 'href' ] ) ) {
460
- $href = $instance[ 'href' ];
461
  } else {
462
  $href = '';
463
  }
464
- if ( isset( $instance[ 'width' ] ) ) {
465
- $width = $instance[ 'width' ];
466
  } else {
467
  $width = '';
468
  }
469
- if ( isset( $instance[ 'height' ] ) ) {
470
- $height = $instance[ 'height' ];
471
  } else {
472
  $height = '';
473
  }
474
- if ( isset( $instance[ 'cover' ] ) ) {
475
- $cover = $instance[ 'cover' ];
476
  } else {
477
  $cover = 'false';
478
  }
479
- if ( isset( $instance[ 'facepile' ] ) ) {
480
- $facepile = $instance[ 'facepile' ];
481
  } else {
482
  $facepile = 'false';
483
  }
484
- if ( isset( $instance[ 'tabs' ] ) ) {
485
- $tabs = $instance[ 'tabs' ];
486
  } else {
487
  $tabs = '';
488
  }
489
- if ( isset( $instance[ 'cta' ] ) ) {
490
- $cta = $instance[ 'cta' ];
491
  } else {
492
  $cta = 'false';
493
  }
494
- if ( isset( $instance[ 'small' ] ) ) {
495
- $small = $instance[ 'small' ];
496
  } else {
497
  $small = 'false';
498
  }
499
- if ( isset( $instance[ 'adapt' ] ) ) {
500
- $adapt = $instance[ 'adapt' ];
501
  } else {
502
  $adapt = 'true';
503
  }
504
- if ( isset( $instance[ 'link' ] ) ) {
505
- $link = $instance[ 'link' ];
506
  } else {
507
  $link = 'true';
508
  }
509
- if ( isset( $instance[ 'linktext' ] ) ) {
510
- $linktext = $instance[ 'linktext' ];
511
  } else {
512
  $linktext = '';
513
  }
514
- if ( isset( $instance[ 'language' ] ) ) {
515
- $language = $instance[ 'language' ];
516
  } else {
517
  $language = '';
518
  }
 
 
 
 
 
519
 
520
- $langs = $this->settings->get_locale_xml();
521
 
522
  echo cameronjonesweb_facebook_page_plugin::donate_notice();
523
 
@@ -632,11 +796,14 @@ class cameronjonesweb_facebook_page_plugin_widget extends WP_Widget {
632
  );
633
 
634
  printf(
635
- '<p><label for="%1$s">%2$s</label><input class="widefat" id="%1$s" name="%3$s" type="text" value="%4$s" /></p>',
636
- esc_attr( $this->get_field_id( 'linktext' ) ),
637
- esc_html__( 'Link text:', 'facebook-page-feed-graph-api' ),
638
- esc_attr( $this->get_field_name( 'linktext' ) ),
639
- esc_attr( $linktext )
 
 
 
640
  );
641
 
642
  printf(
@@ -647,12 +814,12 @@ class cameronjonesweb_facebook_page_plugin_widget extends WP_Widget {
647
  call_user_func(
648
  function() use ( $langs, $language ) {
649
  $return = '<option value="">' . esc_html__( 'Site Language (default)', 'facebook-page-feed-graph-api' ) . '</option>';
650
- foreach ( $langs as $lang ) {
651
  $return .= sprintf(
652
  '<option value="%1$s" %2$s>%3$s</option>',
653
- esc_attr( $lang->standard->representation ),
654
- selected( esc_attr( $language ), $lang->standard->representation, false ),
655
- esc_html( $lang->englishName )
656
  );
657
  }
658
  return $return;
@@ -660,38 +827,45 @@ class cameronjonesweb_facebook_page_plugin_widget extends WP_Widget {
660
  )
661
  );
662
  }
663
-
664
- // Updating widget replacing old instances with new
 
 
 
 
 
 
665
  public function update( $new_instance, $old_instance ) {
666
- $instance = array();
667
- $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';
668
  if ( ! empty( $new_instance['href'] ) ) {
669
- $href = strip_tags( $new_instance['href'] );
670
- $href = wp_http_validate_url( $href ) ? $href : 'https://facebook.com/' . $href;
671
  $instance['href'] = esc_url( $href );
672
  } else {
673
  $instance['href'] = '';
674
  }
675
- $instance['width'] = ( ! empty( $new_instance['width'] ) ) ? strip_tags( $new_instance['width'] ) : '';
676
- $instance['height'] = ( ! empty( $new_instance['height'] ) ) ? strip_tags( $new_instance['height'] ) : '';
677
- $instance['cover'] = ( ! empty( $new_instance['cover'] ) ) ? strip_tags( $new_instance['cover'] ) : '';
678
- $instance['facepile'] = ( ! empty( $new_instance['facepile'] ) ) ? strip_tags( $new_instance['facepile'] ) : '';
679
- if( !empty( $new_instance['tabs'] ) ) {
680
- if( is_array( $new_instance['tabs'] ) ) {
681
- foreach( $new_instance['tabs'] as $key => $var ) {
682
  $instance['tabs'][] = sanitize_text_field( $key );
683
  }
684
  }
685
  } else {
686
  $instance['tabs'] = '';
687
  }
688
- $instance['cta'] = ( ! empty( $new_instance['cta'] ) ) ? strip_tags( $new_instance['cta'] ) : '';
689
- $instance['small'] = ( ! empty( $new_instance['small'] ) ) ? strip_tags( $new_instance['small'] ) : '';
690
- $instance['adapt'] = ( ! empty( $new_instance['adapt'] ) ) ? strip_tags( $new_instance['adapt'] ) : '';
691
- $instance['link'] = ( ! empty( $new_instance['link'] ) ) ? strip_tags( $new_instance['link'] ) : '';
692
- $instance['linktext'] = ( ! empty( $new_instance['linktext'] ) ) ? strip_tags( $new_instance['linktext'] ) : '';
693
- $instance['language'] = ( ! empty( $new_instance['language'] ) ) ? strip_tags( $new_instance['language'] ) : '';
694
- return $instance;
 
695
  }
696
 
697
  }
@@ -700,51 +874,52 @@ class cameronjonesweb_facebook_page_plugin_shortcode_generator {
700
 
701
  private $langs;
702
  private $settings;
703
-
704
  function __construct() {
705
 
706
- $this->settings = new facebook_page_plugin_settings;
707
- $this->langs = $this->settings->get_locale_xml();
708
  }
709
 
710
  function generate() {
711
-
712
- $return = NULL;
713
 
714
  $return .= cameronjonesweb_facebook_page_plugin::donate_notice();
715
 
716
  $return .= '<noscript>' . __( 'The shortcode generator requires JavaScript enabled', 'facebook-page-feed-graph-api' ) . '</noscript>';
717
 
718
- $return .= '<form>';
719
- $return .= '<p><label>' . __( 'Facebook Page URL', 'facebook-page-feed-graph-api' ) . ': <input type="url" id="fbpp-href" /></label></p>';
720
- $return .= '<p><label>' . __( 'Width (pixels)', 'facebook-page-feed-graph-api' ) . ': <input type="number" max="500" min="180" id="fbpp-width" /></label></p>';
721
- $return .= '<p><label>' . __( 'Height (pixels)', 'facebook-page-feed-graph-api' ) . ': <input type="number" min="70" id="fbpp-height" /></label></p>';
722
- $return .= '<p><label>' . __( 'Show Cover Photo', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-cover" /></label></p>';
723
- $return .= '<p><label>' . __( 'Show Facepile', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-facepile" /></label></p>';
724
- $return .= '<p><label>' . __( 'Page Tabs (formerly posts)', 'facebook-page-feed-graph-api' ) . ':';
725
- $settings = new facebook_page_plugin_settings;
726
- $CJW_FBPP_TABS = $settings->tabs();
727
- if( !empty( $CJW_FBPP_TABS ) ) {
728
- foreach( $CJW_FBPP_TABS as $tab ) {
729
- $return .= '<br/><label>';
730
- $return .= '<input type="checkbox" class="fbpp-tabs" name="' . $tab . '" /> ';
731
- $return .= __( ucfirst( $tab ), 'facebook-page-feed-graph-api' );
732
- $return .= '</label>';
733
- }
734
- }
735
- $return .= '<p><label>' . __( 'Hide Call To Action', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-cta" /></label></p>';
736
- $return .= '<p><label>' . __( 'Small Header', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-small" /></label></p>';
737
- $return .= '<p><label>' . __( 'Adaptive Width', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-adapt" checked /></label></p>';
738
- $return .= '<p><label>' . __( 'Display link while loading', 'facebook-page-feed-graph-api' ) . ': <input type="checkbox" value="true" id="fbpp-link" checked /></label></p>';
739
- $return .= '<p id="linktext-label"><label>' . __( 'Link text', 'facebook-page-feed-graph-api' ) . ': <input type="text" id="fbpp-linktext" /></label></p>';
740
- $return .= '<p><label>' . __( 'Language', 'facebook-page-feed-graph-api' ) . ': <select id="fbpp-lang"><option value="">' . __( 'Site Language', 'facebook-page-feed-graph-api' ) . '</option>';
741
- if(isset($this->langs) && !empty($this->langs)){
742
- foreach($this->langs as $lang){
743
- $return .= '<option value="' . $lang->standard->representation . '">' . __( $lang->englishName, 'facebook-page-feed-graph-api' ) . '</option>';
744
- }
745
  }
746
- $return .= '</select></label></p>';
747
- $return .= '<input type="text" readonly="readonly" id="facebook-page-plugin-shortcode-generator-output" onfocus="this.select()" />';
 
748
  $return .= '</form>';
749
 
750
  echo $return;
@@ -763,35 +938,11 @@ class facebook_page_plugin_settings {
763
  function tabs() {
764
  return $this->tabs;
765
  }
766
-
767
- function get_locale_xml() {
768
-
769
- $admin_abspath = str_replace( site_url(), ABSPATH, admin_url() );
770
-
771
- include_once( $admin_abspath . '/includes/class-wp-filesystem-base.php' );
772
- include_once( $admin_abspath . '/includes/class-wp-filesystem-direct.php' );
773
- $wp_filesystem = new WP_Filesystem_Direct( null );
774
-
775
- try {
776
- //$xml = file_get_contents('https://www.facebook.com/translations/FacebookLocales.xml');
777
- //$xml = file_get_contents( CJW_FBPP_PLUGIN_URL ) . 'lang.xml');
778
- $lang_xml = $wp_filesystem->get_contents( CJW_FBPP_PLUGIN_DIR . '/lang.xml');
779
- } catch( Exception $ex ){
780
- $lang_xml = NULL;
781
- }
782
-
783
- if(isset($lang_xml) && !empty($lang_xml)){
784
- $langs = new SimpleXMLElement($lang_xml);
785
- } else {
786
- $langs = NULL;
787
- }
788
-
789
- return $langs;
790
- }
791
-
792
  }
793
 
794
- // Register the widget.
 
 
795
  function facebook_page_plugin_load_widget() {
796
  register_widget( 'cameronjonesweb_facebook_page_plugin_widget' );
797
  }
3
  * Plugin Name: Mongoose Page Plugin
4
  * Plugin URI: https://mongoosemarketplace.com/downloads/facebook-page-plugin/
5
  * Description: The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 95 different languages
6
+ * Version: 1.8.0
7
  * Author: Mongoose Marketplace
8
  * Author URI: https://mongoosemarketplace.com/
9
  * License: GPLv2
27
 
28
  public static $remove_donate_notice_key = 'facebook_page_plugin_donate_notice_ignore';
29
 
30
+ public static $locales = array(
31
+ 'so_SO' => 'Af-Soomaali',
32
+ 'af_ZA' => 'Afrikaans',
33
+ 'az_AZ' => 'Azərbaycan dili',
34
+ 'id_ID' => 'Bahasa Indonesia',
35
+ 'ms_MY' => 'Bahasa Melayu',
36
+ 'jv_ID' => 'Basa Jawa',
37
+ 'cx_PH' => 'Bisaya',
38
+ 'bs_BA' => 'Bosanski',
39
+ 'br_FR' => 'Brezhoneg',
40
+ 'ca_ES' => 'Català',
41
+ 'co_FR' => 'Corsu',
42
+ 'cy_GB' => 'Cymraeg',
43
+ 'da_DK' => 'Dansk',
44
+ 'de_DE' => 'Deutsch',
45
+ 'et_EE' => 'Eesti',
46
+ 'en_GB' => 'English (UK)',
47
+ 'en_US' => 'English (US)',
48
+ 'en_UD' => 'English (uʍop əpısdՈ)',
49
+ 'es_LA' => 'Español',
50
+ 'es_ES' => 'Español (España)',
51
+ 'eo_EO' => 'Esperanto',
52
+ 'eu_ES' => 'Euskara',
53
+ 'tl_PH' => 'Filipino',
54
+ 'fr_CA' => 'Français (Canada)',
55
+ 'fr_FR' => 'Français (France)',
56
+ 'fy_NL' => 'Frysk',
57
+ 'ff_NG' => 'Fula',
58
+ 'fo_FO' => 'Føroyskt',
59
+ 'ga_IE' => 'Gaeilge',
60
+ 'gl_ES' => 'Galego',
61
+ 'gn_PY' => 'Guarani',
62
+ 'ha_NG' => 'Hausa',
63
+ 'hr_HR' => 'Hrvatski',
64
+ 'rw_RW' => 'Ikinyarwanda',
65
+ 'it_IT' => 'Italiano',
66
+ 'sw_KE' => 'Kiswahili',
67
+ 'ht_HT' => 'Kreyòl Ayisyen',
68
+ 'ku_TR' => 'Kurdî (Kurmancî)',
69
+ 'lv_LV' => 'Latviešu',
70
+ 'lt_LT' => 'Lietuvių',
71
+ 'hu_HU' => 'Magyar',
72
+ 'mg_MG' => 'Malagasy',
73
+ 'mt_MT' => 'Malti',
74
+ 'nl_NL' => 'Nederlands',
75
+ 'nl_BE' => 'Nederlands (België)',
76
+ 'nb_NO' => 'Norsk (bokmål)',
77
+ 'nn_NO' => 'Norsk (nynorsk)',
78
+ 'uz_UZ' => 'O\'zbek',
79
+ 'pl_PL' => 'Polski',
80
+ 'pt_BR' => 'Português (Brasil)',
81
+ 'pt_PT' => 'Português (Portugal)',
82
+ 'ro_RO' => 'Română',
83
+ 'sc_IT' => 'Sardu',
84
+ 'sn_ZW' => 'Shona',
85
+ 'sq_AL' => 'Shqip',
86
+ 'sk_SK' => 'Slovenčina',
87
+ 'sl_SI' => 'Slovenščina',
88
+ 'fi_FI' => 'Suomi',
89
+ 'sv_SE' => 'Svenska',
90
+ 'vi_VN' => 'Tiếng Việt',
91
+ 'tr_TR' => 'Türkçe',
92
+ 'zz_TR' => 'Zaza',
93
+ 'is_IS' => 'Íslenska',
94
+ 'cs_CZ' => 'Čeština',
95
+ 'sz_PL' => 'ślōnskŏ gŏdka',
96
+ 'el_GR' => 'Ελληνικά',
97
+ 'be_BY' => 'Беларуская',
98
+ 'bg_BG' => 'Български',
99
+ 'mk_MK' => 'Македонски',
100
+ 'mn_MN' => 'Монгол',
101
+ 'ru_RU' => 'Русский',
102
+ 'sr_RS' => 'Српски',
103
+ 'tt_RU' => 'Татарча',
104
+ 'tg_TJ' => 'Тоҷикӣ',
105
+ 'uk_UA' => 'Українська',
106
+ 'ky_KG' => 'кыргызча',
107
+ 'kk_KZ' => 'Қазақша',
108
+ 'hy_AM' => 'Հայերեն',
109
+ 'he_IL' => 'עברית',
110
+ 'ur_PK' => 'اردو',
111
+ 'ar_AR' => 'العربية',
112
+ 'fa_IR' => 'فارسی',
113
+ 'ps_AF' => 'پښتو',
114
+ 'cb_IQ' => 'کوردیی ناوەندی',
115
+ 'sy_SY' => 'ܣܘܪܝܝܐ',
116
+ 'ne_NP' => 'नेपाली',
117
+ 'mr_IN' => 'मराठी',
118
+ 'hi_IN' => 'हिन्दी',
119
+ 'as_IN' => 'অসমীয়া',
120
+ 'bn_IN' => 'বাংলা',
121
+ 'pa_IN' => 'ਪੰਜਾਬੀ',
122
+ 'gu_IN' => 'ગુજરાતી',
123
+ 'or_IN' => 'ଓଡ଼ିଆ',
124
+ 'ta_IN' => 'தமிழ்',
125
+ 'te_IN' => 'తెలుగు',
126
+ 'kn_IN' => 'ಕನ್ನಡ',
127
+ 'ml_IN' => 'മലയാളം',
128
+ 'si_LK' => 'සිංහල',
129
+ 'th_TH' => 'ภาษาไทย',
130
+ 'lo_LA' => 'ພາສາລາວ',
131
+ 'my_MM' => 'မြန်မာဘာသာ',
132
+ 'ka_GE' => 'ქართული',
133
+ 'am_ET' => 'አማርኛ',
134
+ 'km_KH' => 'ភាសាខ្មែរ',
135
+ 'tz_MA' => 'ⵜⴰⵎⴰⵣⵉⵖⵜ',
136
+ 'zh_TW' => '中文(台灣)',
137
+ 'zh_CN' => '中文(简体)',
138
+ 'zh_HK' => '中文(香港)',
139
+ 'ja_JP' => '日本語',
140
+ 'ja_KS' => '日本語(関西)',
141
+ 'ko_KR' => '한국어',
142
+ );
143
+
144
  public function __construct() {
145
 
146
  define( 'CJW_FBPP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
147
  define( 'CJW_FBPP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
148
  define( 'CJW_FBPP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
149
+ define( 'CJW_FBPP_PLUGIN_VER', '1.8.0' );
150
  define( 'CJW_FBPP_PLUGIN_DONATE_LINK', 'https://www.patreon.com/cameronjonesweb' );
151
  define( 'CJW_FBPP_PLUGIN_SURVEY_LINK', 'https://cameronjonesweb.typeform.com/to/BllbYm' );
152
 
153
  // Add all the hooks and actions.
154
  add_shortcode( 'facebook-page-plugin', array( $this, 'facebook_page_plugin' ) );
 
155
  add_action( 'wp_dashboard_setup', array( $this, 'facebook_page_plugin_dashboard_widget' ) );
156
  add_action( 'admin_enqueue_scripts', array( $this, 'facebook_page_plugin_admin_resources' ) );
157
  add_action( 'admin_init', array( $this, 'remove_donate_notice_nojs' ) );
159
  add_action( 'wp_ajax_facebook_page_plugin_latest_blog_posts_callback', array( $this, 'facebook_page_plugin_latest_blog_posts_callback' ) );
160
  add_action( 'activated_plugin', array( $this, 'facebook_page_plugin_activation_hook' ) );
161
  add_action( 'wp_ajax_facebook_page_plugin_remove_donate_notice', array( $this, 'remove_donate_notice' ) );
162
+ add_action( 'init', array( $this, 'register_assets' ) );
163
+
164
+ add_filter( 'widget_text', 'do_shortcode' );
165
  add_filter( 'plugin_action_links_' . CJW_FBPP_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
166
 
167
  }
168
 
169
 
170
+ /**
171
+ * Filter functions.
172
+ */
173
  private static function dashboard_widget_capability() {
 
174
  $return = apply_filters( 'facebook_page_plugin_dashboard_widget_capability', 'edit_posts' );
175
  return $return;
 
176
  }
177
 
178
 
179
  private static function app_id() {
 
180
  $return = apply_filters( 'facebook_page_plugin_app_id', '846690882110183' );
181
  return $return;
 
182
  }
183
 
184
 
185
  // Admin functions.
 
186
  public static function donate_notice() {
187
 
188
+ $return = null;
189
 
190
+ if ( current_user_can( 'administrator' ) ) {
191
 
192
  $user_id = get_current_user_id();
193
 
194
+ if ( ! get_user_meta( $user_id, self::$remove_donate_notice_key ) || get_user_meta( $user_id, self::$remove_donate_notice_key ) === false ) {
195
 
196
  $return .= '<div class="facebook-page-plugin-donate"><p>';
197
 
219
 
220
  update_user_meta( $user_id, self::$remove_donate_notice_key, 'true', true );
221
 
222
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
223
 
224
  wp_die();
225
 
248
  return $links;
249
  }
250
 
251
+ /**
252
+ * Register CSS and JS assets
253
+ */
254
+ public function register_assets() {
255
+ wp_register_style( 'facebook-page-plugin-admin-styles', CJW_FBPP_PLUGIN_URL . 'css/admin-global.css', array(), CJW_FBPP_PLUGIN_VER );
256
+ wp_register_style( 'facebook-page-plugin-landing-page-css', CJW_FBPP_PLUGIN_URL . 'css/admin-landing-page.css', array(), CJW_FBPP_PLUGIN_VER );
257
+ wp_register_style( 'facebook-page-plugin-google-fonts', 'https://fonts.googleapis.com/css?family=Rammetto+One|Paytone+One|Space+Mono:400|Muli:400,400i,700', array(), CJW_FBPP_PLUGIN_VER );
258
+
259
+ wp_register_script( 'facebook-page-plugin-admin-scripts', CJW_FBPP_PLUGIN_URL . 'js/admin-global.js', array( 'jquery' ), CJW_FBPP_PLUGIN_VER, true );
260
+ wp_register_script( 'facebook-page-plugin-landing-page-js', CJW_FBPP_PLUGIN_URL . 'js/admin-landing-page.js', array( 'jquery' ), CJW_FBPP_PLUGIN_VER, true );
261
+ wp_register_script( 'facebook-page-plugin-responsive-script', CJW_FBPP_PLUGIN_URL . 'js/responsive.min.js', 'jquery', CJW_FBPP_PLUGIN_VER, true );
262
+ wp_register_script( 'facebook-page-plugin-sk-hosted', 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v9.0', array(), '9.0', true );
263
+ wp_register_script( 'facebook-page-plugin-sdk-local', CJW_FBPP_PLUGIN_URL . 'js/sdk.js', array(), '9.0', true );
264
+ }
265
 
266
+ /**
267
+ * Enqueue CSS and JS for admin
268
+ */
269
  public function facebook_page_plugin_admin_resources() {
270
+ wp_enqueue_script( 'facebook-page-plugin-admin-scripts' );
271
+ wp_enqueue_style( 'facebook-page-plugin-admin-styles' );
 
272
 
273
  }
274
 
275
+ /**
276
+ * Register the dashboard widget
277
+ */
278
  public function facebook_page_plugin_dashboard_widget() {
279
+ if ( current_user_can( self::dashboard_widget_capability() ) ) {
 
 
280
  wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', __( 'Mongoose Page Plugin Shortcode Generator', 'facebook-page-feed-graph-api' ), array( $this, 'facebook_page_plugin_dashboard_widget_callback' ) );
 
281
  }
 
282
  }
283
 
284
  //Load the dashboard widget
286
  echo '<a name="cameronjonesweb_facebook_page_plugin_shortcode_generator"></a>';
287
  $generator = new cameronjonesweb_facebook_page_plugin_shortcode_generator();
288
  $generator->generate();
 
289
  }
290
 
291
  function facebook_page_plugin_landing_page_menu() {
293
  }
294
 
295
  function facebook_page_plugin_landing_page() {
296
+ wp_enqueue_style( 'facebook-page-plugin-landing-page-css' );
297
+ wp_enqueue_style( 'facebook-page-plugin-google-fonts' );
298
+ wp_enqueue_script( 'facebook-page-plugin-landing-page-js' );
299
  include CJW_FBPP_PLUGIN_DIR . '/inc/landing-page.php';
300
  }
301
 
305
  __( 'Developer\'s blog', 'facebook-page-feed-graph-api' ),
306
  __( 'Latest plugin news', 'facebook-page-feed-graph-api' )
307
  );
308
+ wp_widget_rss_output( 'https://feed.rssunify.com/5b718c594e800/rss.xml', ['show_date' => 1 ] );
309
  wp_die( $links );
310
  }
311
 
312
  function facebook_page_plugin_activation_hook( $plugin ) {
313
+ if ( $plugin == CJW_FBPP_PLUGIN_BASENAME ) {
314
  exit( wp_redirect( admin_url( 'options-general.php?page=facebook-page-plugin' ) ) );
315
  }
316
  }
318
 
319
  // Client side stuff.
320
  function facebook_page_plugin_generate_wrapper_id() {
321
+ return wp_generate_password( 15, false );
322
  }
323
 
324
  /**
328
  * @return string
329
  */
330
  public function facebook_page_plugin( $filter ) {
331
+ wp_enqueue_script( 'facebook-page-plugin-responsive-script' );
 
332
  $return = '';
333
  $a = shortcode_atts(
334
  array(
345
  'adapt' => null,
346
  'link' => true,
347
  'linktext' => null,
348
+ 'method' => 'sdk',
349
  '_implementation' => 'shortcode',
350
  ),
351
  $filter
353
  if ( isset( $a['href'] ) && ! empty( $a['href'] ) ) {
354
  $a['language'] = str_replace( '-', '_', $a['language'] );
355
 
 
 
 
356
  $return .= sprintf(
357
+ '<div class="cameronjonesweb_facebook_page_plugin" data-version="%1$s" data-implementation="%2$s" id="%3$s" data-method="%4$s">',
358
  esc_attr( CJW_FBPP_PLUGIN_VER ),
359
  esc_attr( $a['_implementation'] ),
360
+ esc_attr( $this->facebook_page_plugin_generate_wrapper_id() ),
361
+ esc_attr( $a['method'] )
 
 
 
 
 
 
 
362
  );
363
+
364
+ if ( 'sdk' === $a['method'] ) {
365
+
366
+ $return .= '<div id="fb-root"></div><script async defer crossorigin="anonymous" src="https://connect.facebook.net/' . $a['language'] . '/sdk.js#xfbml=1&version=v9.0"></script>';
367
+
 
 
368
  $return .= sprintf(
369
+ '<div class="fb-page" data-href="https://facebook.com/%1$s" ',
370
+ esc_attr( $a['href'] )
371
  );
372
+ if ( isset( $a['width'] ) && ! empty( $a['width'] ) ) {
373
+ $return .= sprintf(
374
+ ' data-width="%1$s" data-max-width="%1$s"',
375
+ esc_attr( $a['width'] )
376
+ );
 
377
  }
378
+ if ( isset( $a['height'] ) && ! empty( $a['height'] ) ) {
379
+ $return .= sprintf(
380
+ ' data-height="%1$s"',
381
+ esc_attr( $a['height'] )
382
+ );
383
+ }
384
+ if ( isset( $a['cover'] ) && ! empty( $a['cover'] ) ) {
385
+ if ( 'false' == $a['cover'] ) {
386
+ $return .= ' data-hide-cover="true"';
387
+ } elseif ( 'true' == $a['cover'] ) {
388
+ $return .= ' data-hide-cover="false"';
389
+ }
390
+ }
391
+ if ( isset( $a['facepile'] ) && ! empty( $a['facepile'] ) ) {
392
+ $return .= ' data-show-facepile="' . esc_attr( $a['facepile'] ) . '"';
393
+ }
394
+ if ( isset( $a['tabs'] ) && ! empty( $a['tabs'] ) ) {
395
+ $return .= sprintf(
396
+ ' data-tabs="%1$s"',
397
+ esc_attr( $a['tabs'] )
398
+ );
399
+ } elseif ( isset( $a['posts'] ) && ! empty( $a['posts'] ) ) {
400
+ if ( 'true' == $a['posts'] ) {
401
+ $return .= ' data-tabs="timeline"';
402
+ } else {
403
+ $return .= ' data-tabs="false"';
404
+ }
405
+ }
406
+ if ( isset( $a['cta'] ) && ! empty( $a['cta'] ) ) {
407
+ $return .= ' data-hide-cta="' . $a['cta'] . '"';
408
+ $return .= sprintf(
409
+ ' data-hide-cta="%1$s"',
410
+ esc_attr( $a['cta'] )
411
+ );
412
+ }
413
+ if ( isset( $a['small'] ) && ! empty( $a['small'] ) ) {
414
+ $return .= sprintf(
415
+ ' data-small-header="%1$s"',
416
+ esc_attr( $a['small'] )
417
+ );
418
+ }
419
+ if ( isset( $a['adapt'] ) && ! empty( $a['adapt'] ) ) {
420
+ $return .= ' data-adapt-container-width="true"';
421
  } else {
422
+ $return .= ' data-adapt-container-width="false"';
423
  }
424
+ $return .= '><div class="fb-xfbml-parse-ignore">';
425
+ if ( 'true' == $a['link'] ) {
426
+ $return .= sprintf(
427
+ '<blockquote cite="https://www.facebook.com/%1$s"><a href="https://www.facebook.com/%1$s">',
428
+ esc_attr( $a['href'] )
429
+ );
430
+ if ( empty( $a['linktext'] ) ) {
431
+ $return .= 'https://www.facebook.com/' . esc_attr( $a['href'] );
432
+ } else {
433
+ $return .= esc_html( $a['linktext'] );
434
+ }
435
+ $return .= '</a></blockquote>';
436
+ }
437
+ $return .= '</div>'; // .fb-xfbml-parse-ignore.
438
+ $return .= '</div>'; // .fb-page.
439
+ } elseif ( 'iframe' === $a['method'] ) {
440
+ $url = add_query_arg(
441
+ array(
442
+ 'href' => $a['href'],
443
+ 'width' => $a['width'],
444
+ 'height' => $a['height'],
445
+ 'hide_cover' => ! is_null( $a['cover'] ) ? strval( ! filter_var( $a['cover'], FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE ) ) : null,
446
+ 'show_facepile' => $a['facepile'],
447
+ 'tabs' => ! empty( $a['posts'] ) ? 'timeline' : $a['tabs'],
448
+ 'hide_cta' => $a['cta'],
449
+ 'small_header' => $a['small'],
450
+ 'adapt_container_width' => $a['adapt'],
451
+ 'locale' => $a['language'],
452
+ ),
453
+ 'https://www.facebook.com/plugins/page.php'
454
  );
 
 
 
 
 
 
 
 
455
  $return .= sprintf(
456
+ '<iframe src="%1$s" width="%2$s" height="%3$s" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>',
457
+ esc_url( $url ),
458
+ esc_attr( $a['width'] ),
459
+ esc_attr( $a['height'] )
460
  );
 
 
 
 
 
 
461
  }
462
+ $return .= '</div>'; // .cameronjonesweb_facebook_page_plugin.
463
  }
464
  return $return;
465
  }
467
  }
468
 
469
  class cameronjonesweb_facebook_page_plugin_widget extends WP_Widget {
470
+
471
+ private $facebook_urls = array( 'https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/', 'http://facebook.com/', 'http://www.facebook.com/' );
472
  private $settings;
473
+
474
  function __construct() {
475
+ $this->settings = new facebook_page_plugin_settings();
476
+ parent::__construct( 'facebook_page_plugin_widget', __( 'Mongoose Page Plugin', 'facebook-page-feed-graph-api' ), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ) ) );
477
  }
478
+
479
  public function widget( $args, $instance ) {
480
+ if ( isset( $instance['title'] ) && ! empty( $instance['title'] ) ) {
481
  $title = apply_filters( 'widget_title', $instance['title'] );
482
  } else {
483
+ $title = null;
484
  }
485
+ if ( isset( $instance['href'] ) && ! empty( $instance['href'] ) ) {
486
  $href = $instance['href'];
487
+ foreach ( $this->facebook_urls as $url ) {
488
+ $href = str_replace( $url, '', $href );
489
  }
490
  } else {
491
+ $href = null;
492
  }
493
+ if ( isset( $instance['width'] ) && ! empty( $instance['width'] ) ) {
494
  $width = $instance['width'];
495
  } else {
496
+ $width = null;
497
  }
498
+ if ( isset( $instance['height'] ) && ! empty( $instance['height'] ) ) {
499
  $height = $instance['height'];
500
  } else {
501
+ $height = null;
502
  }
503
+ if ( isset( $instance['cover'] ) && ! empty( $instance['cover'] ) ) {
504
  $cover = 'true';
505
  } else {
506
  $cover = 'false';
507
  }
508
+ if ( isset( $instance['facepile'] ) && ! empty( $instance['facepile'] ) ) {
509
  $facepile = 'true';
510
  } else {
511
  $facepile = 'false';
512
  }
513
+ if ( isset( $instance['tabs'] ) && ! empty( $instance['tabs'] ) ) {
514
  $tabs = $instance['tabs'];
515
  } else {
516
  $tabs = '';
517
  }
518
+ if ( isset( $instance['cta'] ) && ! empty( $instance['cta'] ) ) {
519
  $cta = 'true';
520
  } else {
521
  $cta = 'false';
522
  }
523
+ if ( isset( $instance['small'] ) && ! empty( $instance['small'] ) ) {
524
  $small = 'true';
525
  } else {
526
  $small = 'false';
527
  }
528
+ if ( isset( $instance['adapt'] ) && ! empty( $instance['adapt'] ) ) {
529
  $adapt = 'true';
530
  } else {
531
  $adapt = 'false';
532
  }
533
+ if ( isset( $instance['link'] ) && ! empty( $instance['link'] ) ) {
534
  $link = 'true';
535
  } else {
536
  $link = 'false';
537
  }
538
+ if ( isset( $instance['linktext'] ) && ! empty( $instance['linktext'] ) ) {
539
  $linktext = $instance['linktext'];
540
  } else {
541
+ $linktext = null;
542
  }
543
+ if ( isset( $instance['language'] ) && ! empty( $instance['language'] ) ) {
544
  $language = $instance['language'];
545
  } else {
546
+ $language = null;
547
  }
548
+ if ( isset( $instance['method'] ) && ! empty( $instance['method'] ) ) {
549
+ $method = $instance['method'];
550
+ } else {
551
+ $method = null;
552
+ }
553
+ echo $args['before_widget']; // phpcs:ignore WordPress.Security.EscapeOutput
554
  if ( ! empty( $title ) ) {
555
+ echo $args['before_title'] . esc_html( $title ) . $args['after_title']; // phpcs:ignore WordPress.Security.EscapeOutput
556
  }
557
+ if ( ! empty( $href ) ) {
558
  $shortcode = '[facebook-page-plugin href="' . $href . '"';
559
+ if ( isset( $width ) && ! empty( $width ) ) {
560
+ $shortcode .= ' width="' . esc_attr( $width ) . '"';
561
  }
562
+ if ( isset( $height ) && ! empty( $height ) ) {
563
+ $shortcode .= ' height="' . esc_attr( $height ) . '"';
564
  }
565
+ if ( isset( $cover ) && ! empty( $cover ) ) {
566
+ $shortcode .= ' cover="' . esc_attr( $cover ) . '"';
567
  }
568
+ if ( isset( $facepile ) && ! empty( $facepile ) ) {
569
+ $shortcode .= ' facepile="' . esc_attr( $facepile ) . '"';
570
  }
571
+ if ( isset( $tabs ) && ! empty( $tabs ) ) {
572
+ if ( is_array( $tabs ) ) {
573
  $shortcode .= ' tabs="';
574
+ for ( $i = 0, $c = count( $tabs ); $i < $c; $i++ ) {
575
+ $shortcode .= esc_attr( $tabs[ $i ] );
576
+ $shortcode .= ( $i < $c - 1 ? ',' : '' );
577
  }
578
  $shortcode .= '"';
579
  } else {
580
+ $shortcode .= ' tabs="' . esc_attr( $tabs ) . '"';
581
  }
582
  }
583
+ if ( isset( $language ) && ! empty( $language ) ) {
584
+ $shortcode .= ' language="' . esc_attr( $language ) . '"';
585
+ }
586
+ if ( isset( $cta ) && ! empty( $cta ) ) {
587
+ $shortcode .= ' cta="' . esc_attr( $cta ) . '"';
588
  }
589
+ if ( isset( $small ) && ! empty( $small ) ) {
590
+ $shortcode .= ' small="' . esc_attr( $small ) . '"';
591
  }
592
+ if ( isset( $adapt ) && ! empty( $adapt ) ) {
593
+ $shortcode .= ' adapt="' . esc_attr( $adapt ) . '"';
594
  }
595
+ if ( isset( $link ) && ! empty( $link ) ) {
596
+ $shortcode .= ' link="' . esc_attr( $link ) . '"';
597
  }
598
+ if ( isset( $linktext ) && ! empty( $linktext ) ) {
599
+ $shortcode .= ' linktext="' . esc_attr( $linktext ) . '"';
600
  }
601
+ if ( isset( $method ) && ! empty( $method ) ) {
602
+ $shortcode .= ' method="' . esc_attr( $method ) . '"';
603
  }
604
  $shortcode .= ' _implementation="widget"';
605
  $shortcode .= ']';
606
  echo do_shortcode( $shortcode );
607
  }
608
+ echo $args['after_widget']; // phpcs:ignore WordPress.Security.EscapeOutput
609
+ }
610
+
611
  public function form( $instance ) {
612
 
613
+ if ( isset( $instance['title'] ) ) {
614
+ $title = $instance['title'];
615
  } else {
616
  $title = __( 'New title', 'facebook-page-feed-graph-api' );
617
  }
618
+ if ( isset( $instance['href'] ) ) {
619
+ $href = $instance['href'];
620
  } else {
621
  $href = '';
622
  }
623
+ if ( isset( $instance['width'] ) ) {
624
+ $width = $instance['width'];
625
  } else {
626
  $width = '';
627
  }
628
+ if ( isset( $instance['height'] ) ) {
629
+ $height = $instance['height'];
630
  } else {
631
  $height = '';
632
  }
633
+ if ( isset( $instance['cover'] ) ) {
634
+ $cover = $instance['cover'];
635
  } else {
636
  $cover = 'false';
637
  }
638
+ if ( isset( $instance['facepile'] ) ) {
639
+ $facepile = $instance['facepile'];
640
  } else {
641
  $facepile = 'false';
642
  }
643
+ if ( isset( $instance['tabs'] ) ) {
644
+ $tabs = $instance['tabs'];
645
  } else {
646
  $tabs = '';
647
  }
648
+ if ( isset( $instance['cta'] ) ) {
649
+ $cta = $instance['cta'];
650
  } else {
651
  $cta = 'false';
652
  }
653
+ if ( isset( $instance['small'] ) ) {
654
+ $small = $instance['small'];
655
  } else {
656
  $small = 'false';
657
  }
658
+ if ( isset( $instance['adapt'] ) ) {
659
+ $adapt = $instance['adapt'];
660
  } else {
661
  $adapt = 'true';
662
  }
663
+ if ( isset( $instance['link'] ) ) {
664
+ $link = $instance['link'];
665
  } else {
666
  $link = 'true';
667
  }
668
+ if ( isset( $instance['linktext'] ) ) {
669
+ $linktext = $instance['linktext'];
670
  } else {
671
  $linktext = '';
672
  }
673
+ if ( isset( $instance['language'] ) ) {
674
+ $language = $instance['language'];
675
  } else {
676
  $language = '';
677
  }
678
+ if ( isset( $instance['method'] ) ) {
679
+ $method = $instance['method'];
680
+ } else {
681
+ $method = '';
682
+ }
683
 
684
+ $langs = cameronjonesweb_facebook_page_plugin::$locales;
685
 
686
  echo cameronjonesweb_facebook_page_plugin::donate_notice();
687
 
796
  );
797
 
798
  printf(
799
+ '<p><label for="%1$s">%2$s</label><select class="widefat" id="%1$s" name="%3$s"><option value="sdk" %6$s>%4$s</option><option value="iframe" %7$s>%5$s</option></select></p>',
800
+ esc_attr( $this->get_field_id( 'method' ) ),
801
+ esc_html__( 'Embed method:', 'facebook-page-feed-graph-api' ),
802
+ esc_attr( $this->get_field_name( 'method' ) ),
803
+ esc_html__( 'SDK', 'facebook-page-feed-graph-api' ),
804
+ esc_html__( 'iframe', 'facebook-page-feed-graph-api' ),
805
+ selected( $method, 'sdk', false ),
806
+ selected( $method, 'iframe', false )
807
  );
808
 
809
  printf(
814
  call_user_func(
815
  function() use ( $langs, $language ) {
816
  $return = '<option value="">' . esc_html__( 'Site Language (default)', 'facebook-page-feed-graph-api' ) . '</option>';
817
+ foreach ( $langs as $code => $label ) {
818
  $return .= sprintf(
819
  '<option value="%1$s" %2$s>%3$s</option>',
820
+ esc_attr( $code ),
821
+ selected( esc_attr( $language ), $code, false ),
822
+ esc_html( $label )
823
  );
824
  }
825
  return $return;
827
  )
828
  );
829
  }
830
+
831
+ /**
832
+ * Updating widget replacing old instances with new
833
+ *
834
+ * @param array $new_instance Updated widget instance.
835
+ * @param array $old_instance Previous widget instance.
836
+ * @return array
837
+ */
838
  public function update( $new_instance, $old_instance ) {
839
+ $instance = array();
840
+ $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? wp_strip_all_tags( $new_instance['title'] ) : '';
841
  if ( ! empty( $new_instance['href'] ) ) {
842
+ $href = wp_strip_all_tags( $new_instance['href'] );
843
+ $href = wp_http_validate_url( $href ) ? $href : 'https://facebook.com/' . $href;
844
  $instance['href'] = esc_url( $href );
845
  } else {
846
  $instance['href'] = '';
847
  }
848
+ $instance['width'] = ( ! empty( $new_instance['width'] ) ) ? wp_strip_all_tags( $new_instance['width'] ) : '';
849
+ $instance['height'] = ( ! empty( $new_instance['height'] ) ) ? wp_strip_all_tags( $new_instance['height'] ) : '';
850
+ $instance['cover'] = ( ! empty( $new_instance['cover'] ) ) ? wp_strip_all_tags( $new_instance['cover'] ) : '';
851
+ $instance['facepile'] = ( ! empty( $new_instance['facepile'] ) ) ? wp_strip_all_tags( $new_instance['facepile'] ) : '';
852
+ if ( ! empty( $new_instance['tabs'] ) ) {
853
+ if ( is_array( $new_instance['tabs'] ) ) {
854
+ foreach ( $new_instance['tabs'] as $key => $var ) {
855
  $instance['tabs'][] = sanitize_text_field( $key );
856
  }
857
  }
858
  } else {
859
  $instance['tabs'] = '';
860
  }
861
+ $instance['cta'] = ( ! empty( $new_instance['cta'] ) ) ? wp_strip_all_tags( $new_instance['cta'] ) : '';
862
+ $instance['small'] = ( ! empty( $new_instance['small'] ) ) ? wp_strip_all_tags( $new_instance['small'] ) : '';
863
+ $instance['adapt'] = ( ! empty( $new_instance['adapt'] ) ) ? wp_strip_all_tags( $new_instance['adapt'] ) : '';
864
+ $instance['link'] = ( ! empty( $new_instance['link'] ) ) ? wp_strip_all_tags( $new_instance['link'] ) : '';
865
+ $instance['linktext'] = ( ! empty( $new_instance['linktext'] ) ) ? wp_strip_all_tags( $new_instance['linktext'] ) : '';
866
+ $instance['language'] = ( ! empty( $new_instance['language'] ) ) ? wp_strip_all_tags( $new_instance['language'] ) : '';
867
+ $instance['method'] = ( ! empty( $new_instance['method'] ) ) ? wp_strip_all_tags( $new_instance['method'] ) : '';
868
+ return $instance;
869
  }
870
 
871
  }
874
 
875
  private $langs;
876
  private $settings;
877
+
878
  function __construct() {
879
 
880
+ $this->settings = new facebook_page_plugin_settings();
881
+ $this->langs = cameronjonesweb_facebook_page_plugin::$locales;
882
  }
883
 
884
  function generate() {
885
+
886
+ $return = null;
887
 
888
  $return .= cameronjonesweb_facebook_page_plugin::donate_notice();
889
 
890
  $return .= '<noscript>' . __( 'The shortcode generator requires JavaScript enabled', 'facebook-page-feed-graph-api' ) . '</noscript>';
891
 
892
+ $return .= '<form>';
893
+ $return .= '<p><label>' . __( 'Facebook Page URL:', 'facebook-page-feed-graph-api' ) . ' <input type="url" id="fbpp-href" /></label></p>';
894
+ $return .= '<p><label>' . __( 'Width (pixels):', 'facebook-page-feed-graph-api' ) . ' <input type="number" max="500" min="180" id="fbpp-width" /></label></p>';
895
+ $return .= '<p><label>' . __( 'Height (pixels):', 'facebook-page-feed-graph-api' ) . ' <input type="number" min="70" id="fbpp-height" /></label></p>';
896
+ $return .= '<p><label>' . __( 'Show Cover Photo:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-cover" /></label></p>';
897
+ $return .= '<p><label>' . __( 'Show Facepile:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-facepile" /></label></p>';
898
+ $return .= '<p><label>' . __( 'Page Tabs:', 'facebook-page-feed-graph-api' );
899
+ $settings = new facebook_page_plugin_settings();
900
+ $cjw_fbpp_tabs = $settings->tabs();
901
+ if ( ! empty( $cjw_fbpp_tabs ) ) {
902
+ foreach ( $cjw_fbpp_tabs as $tab ) {
903
+ $return .= '<br/><label>';
904
+ $return .= '<input type="checkbox" class="fbpp-tabs" name="' . $tab . '" /> ';
905
+ $return .= ucfirst( $tab );
906
+ $return .= '</label>';
907
+ }
908
+ }
909
+ $return .= '<p><label>' . __( 'Hide Call To Action:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-cta" /></label></p>';
910
+ $return .= '<p><label>' . __( 'Small Header:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-small" /></label></p>';
911
+ $return .= '<p><label>' . __( 'Adaptive Width:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-adapt" checked /></label></p>';
912
+ $return .= '<p><label>' . __( 'Display link while loading:', 'facebook-page-feed-graph-api' ) . ' <input type="checkbox" value="true" id="fbpp-link" checked /></label></p>';
913
+ $return .= '<p id="linktext-label"><label>' . __( 'Link text:', 'facebook-page-feed-graph-api' ) . ' <input type="text" id="fbpp-linktext" /></label></p>';
914
+ $return .= '<p><label>' . __( 'Embed method:', 'facebook-page-feed-graph-api' ) . '<select id="fbpp-method"><option value="sdk">' . __( 'SDK', 'facebook-page-feed-graph-api' ) . '</option><option value="iframe">' . __( 'iframe', 'facebook-page-feed-graph-api' ) . '</option></select><label></p>';
915
+ $return .= '<p><label>' . __( 'Language:', 'facebook-page-feed-graph-api' ) . ' <select id="fbpp-lang"><option value="">' . __( 'Site Language', 'facebook-page-feed-graph-api' ) . '</option>';
916
+ if ( isset( $this->langs ) && ! empty( $this->langs ) ) {
917
+ foreach ( $this->langs as $code => $label ) {
918
+ $return .= '<option value="' . esc_attr( $code ) . '">' . esc_html( $label ) . '</option>';
919
  }
920
+ }
921
+ $return .= '</select></label></p>';
922
+ $return .= '<input type="text" readonly="readonly" id="facebook-page-plugin-shortcode-generator-output" onfocus="this.select()" />';
923
  $return .= '</form>';
924
 
925
  echo $return;
938
  function tabs() {
939
  return $this->tabs;
940
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
941
  }
942
 
943
+ /**
944
+ * Register the widget
945
+ */
946
  function facebook_page_plugin_load_widget() {
947
  register_widget( 'cameronjonesweb_facebook_page_plugin_widget' );
948
  }
inc/landing-page.php CHANGED
@@ -6,10 +6,10 @@ if ( ! function_exists( 'plugins_api' ) ) {
6
  }
7
  $plugin_data = plugins_api(
8
  'plugin_information',
9
- [
10
  'slug' => 'facebook-page-feed-graph-api',
11
- 'fields' => [ 'sections' ],
12
- ]
13
  );
14
  ?>
15
  <div class="wrap mongoose-facebook-page-plugin">
@@ -79,17 +79,21 @@ $plugin_data = plugins_api(
79
  <div class="meta-box-sortables">
80
  <div class="postbox mongoose-facebook-page-plugin__box">
81
  <div class="main inside">
82
- <h3><i class="dashicons dashicons-heart"></i> <?php _e( 'Donate', 'facebook-page-feed-graph-api' ); ?></h3>
83
- <p><?php printf(
84
- __( 'Development relies on donations from kind-hearted supporters of the Mongoose Page Plugin. If you\'re enjoying the plugin, <a href="%1$s" target="_blank" rel="noopener noreferrer">please donate today</a>.', 'facebook-page-feed-graph-api' ),
85
- CJW_FBPP_PLUGIN_DONATE_LINK
86
- ); ?></p>
 
 
 
 
87
  </div>
88
  </div>
89
  <div class="postbox mongoose-facebook-page-plugin__box">
90
  <div class="main inside">
91
- <h3><i class="dashicons dashicons-email-alt"></i> <?php _e( 'Plugin Newsletter', 'facebook-page-feed-graph-api' ); ?></h3>
92
- <p><?php _e( 'Subscribe today to receive the latest updates for the Mongoose Page Plugin', 'facebook-page-feed-graph-api' ); ?></p>
93
  <!-- Begin MailChimp Signup Form -->
94
  <div id="mc_embed_signup">
95
  <form action="//cameronjonesweb.us10.list-manage.com/subscribe/post?u=507cd0221f4894316c903e99b&amp;id=8d3d7b8378" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
@@ -109,27 +113,31 @@ $plugin_data = plugins_api(
109
  <div class="main inside">
110
  <h3><i class="dashicons dashicons-star-filled"></i> <?php esc_html_e( 'Leave A Review', 'facebook-page-feed-graph-api' ); ?></h3>
111
  <p>
112
- <?php printf(
113
- '%1$s <a href="https://wordpress.org/support/view/plugin-reviews/facebook-page-feed-graph-api#new-post" target="_blank" rel="noopener noreferrer">%2$s</a>!</p>',
114
- esc_html__( 'Is this the best plugin for adding a Facebook Page to your WordPress website?', 'facebook-page-feed-graph-api' ),
115
- esc_html__( 'Let me know', 'facebook-page-feed-graph-api' )
116
- ); ?>
117
- </p>
 
 
118
  <p>
119
- <?php printf(
120
- __( 'If there\'s a problem, please open a support ticket on <a href="%1$s" target="_blank" rel="noopener noreferrer">Github</a>, on <a href="%2$s" target="_blank" rel="noopener noreferrer">WordPress.org</a>, or <a href="%3$s" target="_blank" rel="noopener noreferrer">email me</a>.', 'facebook-page-feed-graph-api' ),
121
- 'https://github.com/cameronjonesweb/facebook-page-feed-graph-api/issues',
122
- 'https://wordpress.org/support/plugin/facebook-page-feed-graph-api',
123
- 'mailto:support@mongoosemarketplace.com'
124
- ); ?>
125
- </p>
 
 
126
  </div>
127
  </div>
128
  <div class="postbox mongoose-facebook-page-plugin__box">
129
  <div class="main inside">
130
  <h3><i class="dashicons dashicons-chart-line"></i> <?php esc_html_e( 'Take The Survey', 'facebook-page-feed-graph-api' ); ?></h3>
131
  <p><?php esc_html_e( 'Want to have your say about the Mongoose Page Plugin?', 'facebook-page-feed-graph-api' ); ?></p>
132
- <p><a href="<?php echo CJW_FBPP_PLUGIN_SURVEY_LINK; ?>" class="button" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Take The Survey!', 'facebook-page-feed-graph-api' ); ?></a></p>
133
  </div>
134
  </div>
135
  <div class="postbox mongoose-facebook-page-plugin__box">
6
  }
7
  $plugin_data = plugins_api(
8
  'plugin_information',
9
+ array(
10
  'slug' => 'facebook-page-feed-graph-api',
11
+ 'fields' => array( 'sections' ),
12
+ )
13
  );
14
  ?>
15
  <div class="wrap mongoose-facebook-page-plugin">
79
  <div class="meta-box-sortables">
80
  <div class="postbox mongoose-facebook-page-plugin__box">
81
  <div class="main inside">
82
+ <h3><i class="dashicons dashicons-heart"></i> <?php esc_html_e( 'Donate', 'facebook-page-feed-graph-api' ); ?></h3>
83
+ <p>
84
+ <?php
85
+ printf(
86
+ __( 'Development relies on donations from kind-hearted supporters of the Mongoose Page Plugin. If you\'re enjoying the plugin, <a href="%1$s" target="_blank" rel="noopener noreferrer">please donate today</a>.', 'facebook-page-feed-graph-api' ),
87
+ esc_url( CJW_FBPP_PLUGIN_DONATE_LINK )
88
+ );
89
+ ?>
90
+ </p>
91
  </div>
92
  </div>
93
  <div class="postbox mongoose-facebook-page-plugin__box">
94
  <div class="main inside">
95
+ <h3><i class="dashicons dashicons-email-alt"></i> <?php esc_html_e( 'Plugin Newsletter', 'facebook-page-feed-graph-api' ); ?></h3>
96
+ <p><?php esc_html_e( 'Subscribe today to receive the latest updates for the Mongoose Page Plugin', 'facebook-page-feed-graph-api' ); ?></p>
97
  <!-- Begin MailChimp Signup Form -->
98
  <div id="mc_embed_signup">
99
  <form action="//cameronjonesweb.us10.list-manage.com/subscribe/post?u=507cd0221f4894316c903e99b&amp;id=8d3d7b8378" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
113
  <div class="main inside">
114
  <h3><i class="dashicons dashicons-star-filled"></i> <?php esc_html_e( 'Leave A Review', 'facebook-page-feed-graph-api' ); ?></h3>
115
  <p>
116
+ <?php
117
+ printf(
118
+ '%1$s <a href="https://wordpress.org/support/view/plugin-reviews/facebook-page-feed-graph-api#new-post" target="_blank" rel="noopener noreferrer">%2$s</a>!</p>',
119
+ esc_html__( 'Is this the best plugin for adding a Facebook Page to your WordPress website?', 'facebook-page-feed-graph-api' ),
120
+ esc_html__( 'Let me know', 'facebook-page-feed-graph-api' )
121
+ );
122
+ ?>
123
+ </p>
124
  <p>
125
+ <?php
126
+ printf(
127
+ __( 'If there\'s a problem, please open a support ticket on <a href="%1$s" target="_blank" rel="noopener noreferrer">Github</a>, on <a href="%2$s" target="_blank" rel="noopener noreferrer">WordPress.org</a>, or <a href="%3$s" target="_blank" rel="noopener noreferrer">email me</a>.', 'facebook-page-feed-graph-api' ),
128
+ 'https://github.com/cameronjonesweb/facebook-page-feed-graph-api/issues',
129
+ 'https://wordpress.org/support/plugin/facebook-page-feed-graph-api',
130
+ 'mailto:support@mongoosemarketplace.com'
131
+ );
132
+ ?>
133
+ </p>
134
  </div>
135
  </div>
136
  <div class="postbox mongoose-facebook-page-plugin__box">
137
  <div class="main inside">
138
  <h3><i class="dashicons dashicons-chart-line"></i> <?php esc_html_e( 'Take The Survey', 'facebook-page-feed-graph-api' ); ?></h3>
139
  <p><?php esc_html_e( 'Want to have your say about the Mongoose Page Plugin?', 'facebook-page-feed-graph-api' ); ?></p>
140
+ <p><a href="<?php echo esc_url( CJW_FBPP_PLUGIN_SURVEY_LINK ); ?>" class="button" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Take The Survey!', 'facebook-page-feed-graph-api' ); ?></a></p>
141
  </div>
142
  </div>
143
  <div class="postbox mongoose-facebook-page-plugin__box">
js/admin-global.js CHANGED
@@ -1,109 +1,113 @@
1
  (function($){
2
 
3
- $(document).ready(function(){
4
-
5
- $('#facebook-page-plugin-shortcode-generator form').submit(function(e){
6
-
7
- e.preventDefault();
8
-
9
- });
10
-
11
- var $facebookURLs = ['https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/'];
12
- $('#facebook-page-plugin-shortcode-generator input, #facebook-page-plugin-shortcode-generator select').change(function(){
13
- if( $('#fbpp-link').prop("checked") == false ) {
14
- $('#linktext-label').hide();
15
- } else {
16
- $('#linktext-label').show();
17
- }
18
- var $shortcode = '';
19
- $shortcode += '[facebook-page-plugin ';
20
- var $href = $('#fbpp-href').val();
21
- for(i = 0; i < $facebookURLs.length; i++) {
22
- $href = $href.replace($facebookURLs[i],'');
23
- }
24
- if($href.length > 0){
25
- $shortcode += 'href="' + $href + '" ';
26
- var $width = $('#fbpp-width').val();
27
- if($width.length > 0){
28
- $shortcode += 'width="' + $width + '" ';
29
- }
30
- var $height = $('#fbpp-height').val();
31
- if($height.length > 0){
32
- $shortcode += 'height="' + $height + '" ';
33
- }
34
- var $cover = $('#fbpp-cover').prop("checked");
35
- $shortcode += 'cover="' + $cover + '" ';
36
- var $facepile = $('#fbpp-facepile').prop("checked");
37
- $shortcode += 'facepile="' + $facepile + '" ';
38
- var $tabs = [];
39
- $('.fbpp-tabs').each(function(){
40
- if( $(this).prop('checked') == true ) {
41
- $tabs.push( $(this).attr('name' ) );
42
- }
43
- });
44
- if($tabs.length > 0){
45
- var $tabstring = '';
46
- for( $i = 0; $i < $tabs.length; $i++ ) {
47
- $tabstring += $tabs[$i];
48
- if( $i != $tabs.length - 1 ) {
49
- $tabstring += ','
50
- }
51
- }
52
- $shortcode += 'tabs="' + $tabstring + '" ';
53
- }
54
  var $cta = $('#fbpp-cta').prop("checked");
55
- $shortcode += 'cta="' + $cta + '" ';
56
  var $small = $('#fbpp-small').prop("checked");
57
- $shortcode += 'small="' + $small + '" ';
58
  var $adapt = $('#fbpp-adapt').prop("checked");
59
- $shortcode += 'adapt="' + $adapt + '" ';
60
  var $link = $('#fbpp-link').prop("checked");
61
- $shortcode += 'link="' + $link + '" ';
62
- if( $link == true ) {
63
- var $linktext = $('#fbpp-linktext').val();
64
- $shortcode += 'linktext="' + $linktext + '" ';
65
- }
66
  var $lang = $('#fbpp-lang').val();
67
- if($lang.length > 0){
68
- $shortcode += 'language="' + $lang + '" ';
 
69
  }
70
- $shortcode += ']';
71
- $('#facebook-page-plugin-shortcode-generator-output').val($shortcode);
 
 
 
72
 
73
- }
74
 
75
- });
76
 
77
- jQuery( document ).on( 'click', '.facebook-page-plugin-donate-notice-dismiss', function(e){
78
 
79
- e.preventDefault();
80
 
81
- var $notice = jQuery(this).parents('.facebook-page-plugin-donate');
82
 
83
- jQuery.ajax({
84
 
85
- type: "POST",
86
- url: ajaxurl,
87
- data: {
88
 
89
- action: 'facebook_page_plugin_remove_donate_notice',
90
 
91
- },
92
- success: function() {
93
 
94
- $notice.fadeOut();
95
 
96
- },
97
- error: function( data ) {
98
 
99
- console.log( data );
100
 
101
- }
102
 
103
- });
104
 
105
- });
106
 
107
- });
108
 
109
- }(jQuery));
1
  (function($){
2
 
3
+ $(document).ready(function(){
4
+
5
+ $('#facebook-page-plugin-shortcode-generator form').submit(function(e){
6
+
7
+ e.preventDefault();
8
+
9
+ });
10
+
11
+ var $facebookURLs = ['https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/'];
12
+ $('#facebook-page-plugin-shortcode-generator input, #facebook-page-plugin-shortcode-generator select').change(function(){
13
+ if( $('#fbpp-link').prop("checked") == false ) {
14
+ $('#linktext-label').hide();
15
+ } else {
16
+ $('#linktext-label').show();
17
+ }
18
+ var $shortcode = '';
19
+ $shortcode += '[facebook-page-plugin ';
20
+ var $href = $('#fbpp-href').val();
21
+ for(i = 0; i < $facebookURLs.length; i++) {
22
+ $href = $href.replace($facebookURLs[i],'');
23
+ }
24
+ if($href.length > 0){
25
+ $shortcode += 'href="' + $href + '" ';
26
+ var $width = $('#fbpp-width').val();
27
+ if($width.length > 0){
28
+ $shortcode += 'width="' + $width + '" ';
29
+ }
30
+ var $height = $('#fbpp-height').val();
31
+ if($height.length > 0){
32
+ $shortcode += 'height="' + $height + '" ';
33
+ }
34
+ var $cover = $('#fbpp-cover').prop("checked");
35
+ $shortcode += 'cover="' + $cover + '" ';
36
+ var $facepile = $('#fbpp-facepile').prop("checked");
37
+ $shortcode += 'facepile="' + $facepile + '" ';
38
+ var $tabs = [];
39
+ $('.fbpp-tabs').each(function(){
40
+ if( $(this).prop('checked') == true ) {
41
+ $tabs.push( $(this).attr('name' ) );
42
+ }
43
+ });
44
+ if($tabs.length > 0){
45
+ var $tabstring = '';
46
+ for( $i = 0; $i < $tabs.length; $i++ ) {
47
+ $tabstring += $tabs[$i];
48
+ if( $i != $tabs.length - 1 ) {
49
+ $tabstring += ','
50
+ }
51
+ }
52
+ $shortcode += 'tabs="' + $tabstring + '" ';
53
+ }
54
  var $cta = $('#fbpp-cta').prop("checked");
55
+ $shortcode += 'cta="' + $cta + '" ';
56
  var $small = $('#fbpp-small').prop("checked");
57
+ $shortcode += 'small="' + $small + '" ';
58
  var $adapt = $('#fbpp-adapt').prop("checked");
59
+ $shortcode += 'adapt="' + $adapt + '" ';
60
  var $link = $('#fbpp-link').prop("checked");
61
+ $shortcode += 'link="' + $link + '" ';
62
+ if( $link == true ) {
63
+ var $linktext = $('#fbpp-linktext').val();
64
+ $shortcode += 'linktext="' + $linktext + '" ';
65
+ }
66
  var $lang = $('#fbpp-lang').val();
67
+ var $method = $('#fbpp-method').val();
68
+ if($method.length > 0){
69
+ $shortcode += 'method="' + $method + '" ';
70
  }
71
+ if($lang.length > 0){
72
+ $shortcode += 'language="' + $lang + '" ';
73
+ }
74
+ $shortcode += ']';
75
+ $('#facebook-page-plugin-shortcode-generator-output').val($shortcode);
76
 
77
+ }
78
 
79
+ });
80
 
81
+ jQuery( document ).on( 'click', '.facebook-page-plugin-donate-notice-dismiss', function(e){
82
 
83
+ e.preventDefault();
84
 
85
+ var $notice = jQuery(this).parents('.facebook-page-plugin-donate');
86
 
87
+ jQuery.ajax({
88
 
89
+ type: "POST",
90
+ url: ajaxurl,
91
+ data: {
92
 
93
+ action: 'facebook_page_plugin_remove_donate_notice',
94
 
95
+ },
96
+ success: function() {
97
 
98
+ $notice.fadeOut();
99
 
100
+ },
101
+ error: function( data ) {
102
 
103
+ console.log( data );
104
 
105
+ }
106
 
107
+ });
108
 
109
+ });
110
 
111
+ });
112
 
113
+ }(jQuery));
js/responsive.js CHANGED
@@ -1,40 +1,53 @@
1
- var $width = jQuery(window).width();
2
- jQuery(window).resize(function() {
3
- if(this.resizeTO) clearTimeout(this.resizeTO);
4
- if($width != jQuery(window).width()){
5
- this.resizeTO = setTimeout(function() {
6
- jQuery(this).trigger('resizeEnd');
7
- }, 500);
8
- }
9
- });
10
 
11
- jQuery(window).bind('resizeEnd', function() {
12
- $width = jQuery(window).width();
13
- rerenderFB();
14
- });
 
 
 
 
 
 
15
 
16
- function rerenderFB(){
17
- jQuery('.cameronjonesweb_facebook_page_plugin').each(function(){
18
- var container = jQuery(this).children('.fb-page');
19
- var wrapper = jQuery(this);
20
- var url = container.data('href');
21
- var width = wrapper.width();
22
- var max_width = container.data('max-width');
23
- var containerId = jQuery(this).attr('id');
24
- if( jQuery(container).data('adapt-container-width') == true ) {
25
- container.fadeOut("slow", function() {
26
- if( width <= max_width ) {
27
- container.attr("data-width", width);
28
- } else {
29
- container.attr("data-width", max_width);
30
- }
31
- container.load(url, function() {
32
- FB.XFBML.parse(document.getElementById(containerId),
33
- function() {
34
- container.fadeIn("slow");
35
- });
36
- })
37
- });
38
- }
39
- });
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( document ).ready( function() {
2
+ var $width = jQuery( window ).width();
 
 
 
 
 
 
 
3
 
4
+ jQuery( window ).resize( function() {
5
+ if( this.resizeTO ) {
6
+ clearTimeout( this.resizeTO );
7
+ }
8
+ if( $width != jQuery( window ).width() ) {
9
+ this.resizeTO = setTimeout( function() {
10
+ jQuery( this ).trigger( 'resizeEnd' );
11
+ }, 500 );
12
+ }
13
+ });
14
 
15
+ jQuery( window ).bind( 'resizeEnd', function() {
16
+ $width = jQuery( window ).width();
17
+ rerenderFB();
18
+ });
19
+
20
+ function rerenderFB(){
21
+ jQuery( '.cameronjonesweb_facebook_page_plugin' ).each( function() {
22
+ var $this = jQuery( this );
23
+ if ( $this.data( 'method' ) === 'sdk' ) {
24
+ var container = $this.children('.fb-page');
25
+ var wrapper = $this;
26
+ var url = container.data('href');
27
+ var width = wrapper.width();
28
+ var max_width = container.data('max-width');
29
+ var containerId = $this.attr('id');
30
+ if ( jQuery( container ).data( 'adapt-container-width' ) == true ) {
31
+ container.fadeOut( 'slow', function() {
32
+ if( width <= max_width ) {
33
+ container.attr( 'data-width', width );
34
+ } else {
35
+ container.attr( 'data-width', max_width );
36
+ }
37
+ container.load( url, function() {
38
+ window.FB.XFBML.parse( document.getElementById( containerId ),
39
+ function() {
40
+ container.fadeIn( 'slow' );
41
+ });
42
+ })
43
+ });
44
+ }
45
+ } else if ( $this.data( 'method' ) === 'iframe' ) {
46
+ $this.find( 'iframe' ).each( function() {
47
+ console.log( jQuery( this ).attr( 'src' ) );
48
+ jQuery( this ).attr( 'src', jQuery( this ).attr( 'src' ) );
49
+ });
50
+ }
51
+ });
52
+ }
53
+ });
js/responsive.min.js CHANGED
@@ -1 +1 @@
1
- function rerenderFB(){jQuery(".cameronjonesweb_facebook_page_plugin").each(function(){var e=jQuery(this).children(".fb-page"),t=jQuery(this),i=e.data("href"),r=t.width(),n=e.data("max-width"),d=jQuery(this).attr("id");1==jQuery(e).data("adapt-container-width")&&e.fadeOut("slow",function(){n>=r?e.attr("data-width",r):e.attr("data-width",n),e.load(i,function(){FB.XFBML.parse(document.getElementById(d),function(){e.fadeIn("slow")})})})})}var $width=jQuery(window).width();jQuery(window).resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),$width!=jQuery(window).width()&&(this.resizeTO=setTimeout(function(){jQuery(this).trigger("resizeEnd")},500))}),jQuery(window).bind("resizeEnd",function(){$width=jQuery(window).width(),rerenderFB()});
1
+ jQuery(document).ready(function(){var t=jQuery(window).width();jQuery(window).resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),t!=jQuery(window).width()&&(this.resizeTO=setTimeout(function(){jQuery(this).trigger("resizeEnd")},500))}),jQuery(window).bind("resizeEnd",function(){t=jQuery(window).width(),jQuery(".cameronjonesweb_facebook_page_plugin").each(function(){var t,e,i,r,a,n,d=jQuery(this);"sdk"===d.data("method")?(t=d.children(".fb-page"),e=d,i=t.data("href"),r=e.width(),a=t.data("max-width"),n=d.attr("id"),1==jQuery(t).data("adapt-container-width")&&t.fadeOut("slow",function(){r<=a?t.attr("data-width",r):t.attr("data-width",a),t.load(i,function(){window.FB.XFBML.parse(document.getElementById(n),function(){t.fadeIn("slow")})})})):"iframe"===d.data("method")&&d.find("iframe").each(function(){console.log(jQuery(this).attr("src")),jQuery(this).attr("src",jQuery(this).attr("src"))})})})});
js/sdk.js CHANGED
@@ -1 +1,22 @@
1
- (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/" + facebook_page_plugin_language.language + "/sdk.js#xfbml=1&version=v2.4";fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*1605529947,,JIT Construction: v1002983018,en_GB*/
2
+
3
+ /**
4
+ * Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
5
+ *
6
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
7
+ * copy, modify, and distribute this software in source code or binary form for use
8
+ * in connection with the web services and APIs provided by Facebook.
9
+ *
10
+ * As with any software that integrates with the Facebook platform, your use of
11
+ * this software is subject to the Facebook Platform Policy
12
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
13
+ * included in all copies or substantial portions of the software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+ */
22
+ (function _(a,b,c,d,e){var f=window.console;f&&Math.floor(new Date().getTime()/1e3)-b>7*24*60*60&&f.warn("The Facebook JSSDK is more than 7 days old.");if(window[c])return;if(!window.JSON)return;var g=window[c]={__buffer:{replay:function(){var a=this,b=function(d){var b=window[c];a.calls[d][0].split(".").forEach(function(a){return b=b[a]});b.apply(null,a.calls[d][1])};for(var d=0;d<this.calls.length;d++)b(d);this.calls=[]},calls:[],opts:null},getUserID:function(){return""},getAuthResponse:function(){return null},getAccessToken:function(){return null},init:function(a){g.__buffer.opts=a}};for(var b=0;b<d.length;b++){f=d[b];if(f in g)continue;var h=f.split("."),i=h.pop(),j=g;for(var k=0;k<h.length;k++)j=j[h[k]]||(j[h[k]]={});j[i]=function(a){if(a==="init")return;return function(){g.__buffer.calls.push([a,Array.prototype.slice.call(arguments)])}}(f)}k=a;h=/Chrome\/(\d+)/.exec(navigator.userAgent);h&&Number(h[1])>=55&&"assign"in Object&&"findIndex"in[]&&(k+="&ua=modern_es6");j=document.createElement("script");j.src=k;j.async=!0;e&&(j.crossOrigin="anonymous");i=document.getElementsByTagName("script")[0];i.parentNode&&i.parentNode.insertBefore(j,i)})("https:\/\/connect.facebook.net\/en_GB\/sdk.js?hash=27a593128f8553cde22cc5b918c9469e", 1605529947, "FB", ["AppEvents.EventNames","AppEvents.ParameterNames","AppEvents.activateApp","AppEvents.clearAppVersion","AppEvents.clearUserID","AppEvents.getAppVersion","AppEvents.getUserID","AppEvents.logEvent","AppEvents.logPageView","AppEvents.logPurchase","AppEvents.setAppVersion","AppEvents.setUserID","AppEvents.updateUserProperties","Canvas.Plugin.showPluginElement","Canvas.Plugin.hidePluginElement","Canvas.Prefetcher.addStaticResource","Canvas.Prefetcher.setCollectionMode","Canvas.getPageInfo","Canvas.scrollTo","Canvas.setAutoGrow","Canvas.setDoneLoading","Canvas.setSize","Canvas.setUrlHandler","Canvas.startTimer","Canvas.stopTimer","Event.subscribe","Event.unsubscribe","XFBML.parse","addFriend","api","getAccessToken","getAuthResponse","getLoginStatus","getUserID","init","login","logout","publish","share","ui"], true);
lang.xml DELETED
@@ -1,572 +0,0 @@
1
- <locales>
2
- <locale>
3
- <englishName>Afrikaans</englishName>
4
- <standard>
5
- <representation>af_ZA</representation>
6
- </standard>
7
- </locale>
8
- <locale>
9
- <englishName>Albanian</englishName>
10
- <standard>
11
- <representation>sq_AL</representation>
12
- </standard>
13
- </locale>
14
- <locale>
15
- <englishName>Arabic</englishName>
16
- <standard>
17
- <representation>ar_AR</representation>
18
- </standard>
19
- </locale>
20
- <locale>
21
- <englishName>Armenian</englishName>
22
- <standard>
23
- <representation>hy_AM</representation>
24
- </standard>
25
- </locale>
26
- <locale>
27
- <englishName>Azerbaijani</englishName>
28
- <standard>
29
- <representation>az_AZ</representation>
30
- </standard>
31
- </locale>
32
- <locale>
33
- <englishName>Basque</englishName>
34
- <standard>
35
- <representation>eu_ES</representation>
36
- </standard>
37
- </locale>
38
- <locale>
39
- <englishName>Belarusian</englishName>
40
- <standard>
41
- <representation>be_BY</representation>
42
- </standard>
43
- </locale>
44
- <locale>
45
- <englishName>Bengali</englishName>
46
- <standard>
47
- <representation>bn_IN</representation>
48
- </standard>
49
- </locale>
50
- <locale>
51
- <englishName>Bosnian</englishName>
52
- <standard>
53
- <representation>bs_BA</representation>
54
- </standard>
55
- </locale>
56
- <locale>
57
- <englishName>Bulgarian</englishName>
58
- <standard>
59
- <representation>bg_BG</representation>
60
- </standard>
61
- </locale>
62
- <locale>
63
- <englishName>Burmese</englishName>
64
- <standard>
65
- <representation>my_MM</representation>
66
- </standard>
67
- </locale>
68
- <locale>
69
- <englishName>Catalan</englishName>
70
- <standard>
71
- <representation>ca_ES</representation>
72
- </standard>
73
- </locale>
74
- <locale>
75
- <englishName>Cebuano</englishName>
76
- <standard>
77
- <representation>cx_PH</representation>
78
- </standard>
79
- </locale>
80
- <locale>
81
- <englishName>Croatian</englishName>
82
- <standard>
83
- <representation>hr_HR</representation>
84
- </standard>
85
- </locale>
86
- <locale>
87
- <englishName>Czech</englishName>
88
- <standard>
89
- <representation>cs_CZ</representation>
90
- </standard>
91
- </locale>
92
- <locale>
93
- <englishName>Danish</englishName>
94
- <standard>
95
- <representation>da_DK</representation>
96
- </standard>
97
- </locale>
98
- <locale>
99
- <englishName>Dutch</englishName>
100
- <standard>
101
- <representation>nl_NL</representation>
102
- </standard>
103
- </locale>
104
- <locale>
105
- <englishName>Dutch (België)</englishName>
106
- <standard>
107
- <representation>nl_BE</representation>
108
- </standard>
109
- </locale>
110
- <locale>
111
- <englishName>English (Pirate)</englishName>
112
- <standard>
113
- <representation>en_PI</representation>
114
- </standard>
115
- </locale>
116
- <locale>
117
- <englishName>English (UK)</englishName>
118
- <standard>
119
- <representation>en_UK</representation>
120
- </standard>
121
- </locale>
122
- <locale>
123
- <englishName>English (US)</englishName>
124
- <standard>
125
- <representation>en_US</representation>
126
- </standard>
127
- </locale>
128
- <locale>
129
- <englishName>English (Upside Down)</englishName>
130
- <standard>
131
- <representation>en_UD</representation>
132
- </standard>
133
- </locale>
134
- <locale>
135
- <englishName>Esperanto</englishName>
136
- <standard>
137
- <representation>eo_EO</representation>
138
- </standard>
139
- </locale>
140
- <locale>
141
- <englishName>Estonian</englishName>
142
- <standard>
143
- <representation>et_EE</representation>
144
- </standard>
145
- </locale>
146
- <locale>
147
- <englishName>Faroese</englishName>
148
- <standard>
149
- <representation>fo_FO</representation>
150
- </standard>
151
- </locale>
152
- <locale>
153
- <englishName>Filipino</englishName>
154
- <standard>
155
- <representation>tl_PH</representation>
156
- </standard>
157
- </locale>
158
- <locale>
159
- <englishName>Finnish</englishName>
160
- <standard>
161
- <representation>fi_FI</representation>
162
- </standard>
163
- </locale>
164
- <locale>
165
- <englishName>French (Canada)</englishName>
166
- <standard>
167
- <representation>fr_CA</representation>
168
- </standard>
169
- </locale>
170
- <locale>
171
- <englishName>French (France)</englishName>
172
- <standard>
173
- <representation>fr_FR</representation>
174
- </standard>
175
- </locale>
176
- <locale>
177
- <englishName>Frisian</englishName>
178
- <standard>
179
- <representation>fy_NL</representation>
180
- </standard>
181
- </locale>
182
- <locale>
183
- <englishName>Galician</englishName>
184
- <standard>
185
- <representation>gl_ES</representation>
186
- </standard>
187
- </locale>
188
- <locale>
189
- <englishName>Georgian</englishName>
190
- <standard>
191
- <representation>ka_GE</representation>
192
- </standard>
193
- </locale>
194
- <locale>
195
- <englishName>German</englishName>
196
- <standard>
197
- <representation>de_DE</representation>
198
- </standard>
199
- </locale>
200
- <locale>
201
- <englishName>Greek</englishName>
202
- <standard>
203
- <representation>el_GR</representation>
204
- </standard>
205
- </locale>
206
- <locale>
207
- <englishName>Guarani</englishName>
208
- <standard>
209
- <representation>gn_PY</representation>
210
- </standard>
211
- </locale>
212
- <locale>
213
- <englishName>Gujarati</englishName>
214
- <standard>
215
- <representation>gu_IN</representation>
216
- </standard>
217
- </locale>
218
- <locale>
219
- <englishName>Hebrew</englishName>
220
- <standard>
221
- <representation>he_IL</representation>
222
- </standard>
223
- </locale>
224
- <locale>
225
- <englishName>Hindi</englishName>
226
- <standard>
227
- <representation>hi_IN</representation>
228
- </standard>
229
- </locale>
230
- <locale>
231
- <englishName>Hungarian</englishName>
232
- <standard>
233
- <representation>hu_HU</representation>
234
- </standard>
235
- </locale>
236
- <locale>
237
- <englishName>Icelandic</englishName>
238
- <standard>
239
- <representation>is_IS</representation>
240
- </standard>
241
- </locale>
242
- <locale>
243
- <englishName>Indonesian</englishName>
244
- <standard>
245
- <representation>id_ID</representation>
246
- </standard>
247
- </locale>
248
- <locale>
249
- <englishName>Irish</englishName>
250
- <standard>
251
- <representation>ga_IE</representation>
252
- </standard>
253
- </locale>
254
- <locale>
255
- <englishName>Italian</englishName>
256
- <standard>
257
- <representation>it_IT</representation>
258
- </standard>
259
- </locale>
260
- <locale>
261
- <englishName>Japanese</englishName>
262
- <standard>
263
- <representation>ja_JP</representation>
264
- </standard>
265
- </locale>
266
- <locale>
267
- <englishName>Japanese (Kansai)</englishName>
268
- <standard>
269
- <representation>ja_KS</representation>
270
- </standard>
271
- </locale>
272
- <locale>
273
- <englishName>Javanese</englishName>
274
- <standard>
275
- <representation>jv_ID</representation>
276
- </standard>
277
- </locale>
278
- <locale>
279
- <englishName>Kannada</englishName>
280
- <standard>
281
- <representation>kn_IN</representation>
282
- </standard>
283
- </locale>
284
- <locale>
285
- <englishName>Kazakh</englishName>
286
- <standard>
287
- <representation>kk_KZ</representation>
288
- </standard>
289
- </locale>
290
- <locale>
291
- <englishName>Khmer</englishName>
292
- <standard>
293
- <representation>km_KH</representation>
294
- </standard>
295
- </locale>
296
- <locale>
297
- <englishName>Korean</englishName>
298
- <standard>
299
- <representation>ko_KR</representation>
300
- </standard>
301
- </locale>
302
- <locale>
303
- <englishName>Kurdish (Kurmanji)</englishName>
304
- <standard>
305
- <representation>ku_TR</representation>
306
- </standard>
307
- </locale>
308
- <locale>
309
- <englishName>Latin</englishName>
310
- <standard>
311
- <representation>la_VA</representation>
312
- </standard>
313
- </locale>
314
- <locale>
315
- <englishName>Latvian</englishName>
316
- <standard>
317
- <representation>lv_LV</representation>
318
- </standard>
319
- </locale>
320
- <locale>
321
- <englishName>Leet Speak</englishName>
322
- <standard>
323
- <representation>fb_LT</representation>
324
- </standard>
325
- </locale>
326
- <locale>
327
- <englishName>Lithuanian</englishName>
328
- <standard>
329
- <representation>lt_LT</representation>
330
- </standard>
331
- </locale>
332
- <locale>
333
- <englishName>Macedonian</englishName>
334
- <standard>
335
- <representation>mk_MK</representation>
336
- </standard>
337
- </locale>
338
- <locale>
339
- <englishName>Malay</englishName>
340
- <standard>
341
- <representation>ms_MY</representation>
342
- </standard>
343
- </locale>
344
- <locale>
345
- <englishName>Malayalam</englishName>
346
- <standard>
347
- <representation>ml_IN</representation>
348
- </standard>
349
- </locale>
350
- <locale>
351
- <englishName>Marathi</englishName>
352
- <standard>
353
- <representation>mr_IN</representation>
354
- </standard>
355
- </locale>
356
- <locale>
357
- <englishName>Mongolian</englishName>
358
- <standard>
359
- <representation>mn_MN</representation>
360
- </standard>
361
- </locale>
362
- <locale>
363
- <englishName>Nepali</englishName>
364
- <standard>
365
- <representation>ne_NP</representation>
366
- </standard>
367
- </locale>
368
- <locale>
369
- <englishName>Norwegian (bokmal)</englishName>
370
- <standard>
371
- <representation>nb_NO</representation>
372
- </standard>
373
- </locale>
374
- <locale>
375
- <englishName>Norwegian (nynorsk)</englishName>
376
- <standard>
377
- <representation>nn_NO</representation>
378
- </standard>
379
- </locale>
380
- <locale>
381
- <englishName>Oriya</englishName>
382
- <standard>
383
- <representation>or_IN</representation>
384
- </standard>
385
- </locale>
386
- <locale>
387
- <englishName>Pashto</englishName>
388
- <standard>
389
- <representation>ps_AF</representation>
390
- </standard>
391
- </locale>
392
- <locale>
393
- <englishName>Persian</englishName>
394
- <standard>
395
- <representation>fa_IR</representation>
396
- </standard>
397
- </locale>
398
- <locale>
399
- <englishName>Polish</englishName>
400
- <standard>
401
- <representation>pl_PL</representation>
402
- </standard>
403
- </locale>
404
- <locale>
405
- <englishName>Portuguese (Brazil)</englishName>
406
- <standard>
407
- <representation>pt_BR</representation>
408
- </standard>
409
- </locale>
410
- <locale>
411
- <englishName>Portuguese (Portugal)</englishName>
412
- <standard>
413
- <representation>pt_PT</representation>
414
- </standard>
415
- </locale>
416
- <locale>
417
- <englishName>Punjabi</englishName>
418
- <standard>
419
- <representation>pa_IN</representation>
420
- </standard>
421
- </locale>
422
- <locale>
423
- <englishName>Romanian</englishName>
424
- <standard>
425
- <representation>ro_RO</representation>
426
- </standard>
427
- </locale>
428
- <locale>
429
- <englishName>Russian</englishName>
430
- <standard>
431
- <representation>ru_RU</representation>
432
- </standard>
433
- </locale>
434
- <locale>
435
- <englishName>Serbian</englishName>
436
- <standard>
437
- <representation>sr_RS</representation>
438
- </standard>
439
- </locale>
440
- <locale>
441
- <englishName>Simplified Chinese (China)</englishName>
442
- <standard>
443
- <representation>zh_CN</representation>
444
- </standard>
445
- </locale>
446
- <locale>
447
- <englishName>Sinhala</englishName>
448
- <standard>
449
- <representation>si_LK</representation>
450
- </standard>
451
- </locale>
452
- <locale>
453
- <englishName>Slovak</englishName>
454
- <standard>
455
- <representation>sk_SK</representation>
456
- </standard>
457
- </locale>
458
- <locale>
459
- <englishName>Slovenian</englishName>
460
- <standard>
461
- <representation>sl_SI</representation>
462
- </standard>
463
- </locale>
464
- <locale>
465
- <englishName>Sorani Kurdish</englishName>
466
- <standard>
467
- <representation>cb_IQ</representation>
468
- </standard>
469
- </locale>
470
- <locale>
471
- <englishName>Spanish</englishName>
472
- <standard>
473
- <representation>es_LA</representation>
474
- </standard>
475
- </locale>
476
- <locale>
477
- <englishName>Spanish (Colombia)</englishName>
478
- <standard>
479
- <representation>es_CO</representation>
480
- </standard>
481
- </locale>
482
- <locale>
483
- <englishName>Spanish (Spain)</englishName>
484
- <standard>
485
- <representation>es_ES</representation>
486
- </standard>
487
- </locale>
488
- <locale>
489
- <englishName>Swahili</englishName>
490
- <standard>
491
- <representation>sw_KE</representation>
492
- </standard>
493
- </locale>
494
- <locale>
495
- <englishName>Swedish</englishName>
496
- <standard>
497
- <representation>sv_SE</representation>
498
- </standard>
499
- </locale>
500
- <locale>
501
- <englishName>Tajik</englishName>
502
- <standard>
503
- <representation>tg_TJ</representation>
504
- </standard>
505
- </locale>
506
- <locale>
507
- <englishName>Tamil</englishName>
508
- <standard>
509
- <representation>ta_IN</representation>
510
- </standard>
511
- </locale>
512
- <locale>
513
- <englishName>Telugu</englishName>
514
- <standard>
515
- <representation>te_IN</representation>
516
- </standard>
517
- </locale>
518
- <locale>
519
- <englishName>Thai</englishName>
520
- <standard>
521
- <representation>th_TH</representation>
522
- </standard>
523
- </locale>
524
- <locale>
525
- <englishName>Traditional Chinese (Hong Kong)</englishName>
526
- <standard>
527
- <representation>zh_HK</representation>
528
- </standard>
529
- </locale>
530
- <locale>
531
- <englishName>Traditional Chinese (Taiwan)</englishName>
532
- <standard>
533
- <representation>zh_TW</representation>
534
- </standard>
535
- </locale>
536
- <locale>
537
- <englishName>Turkish</englishName>
538
- <standard>
539
- <representation>tr_TR</representation>
540
- </standard>
541
- </locale>
542
- <locale>
543
- <englishName>Ukrainian</englishName>
544
- <standard>
545
- <representation>uk_UA</representation>
546
- </standard>
547
- </locale>
548
- <locale>
549
- <englishName>Urdu</englishName>
550
- <standard>
551
- <representation>ur_PK</representation>
552
- </standard>
553
- </locale>
554
- <locale>
555
- <englishName>Uzbek</englishName>
556
- <standard>
557
- <representation>uz_UZ</representation>
558
- </standard>
559
- </locale>
560
- <locale>
561
- <englishName>Vietnamese</englishName>
562
- <standard>
563
- <representation>vi_VN</representation>
564
- </standard>
565
- </locale>
566
- <locale>
567
- <englishName>Welsh</englishName>
568
- <standard>
569
- <representation>cy_GB</representation>
570
- </standard>
571
- </locale>
572
- </locales>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.md CHANGED
@@ -1,10 +1,10 @@
1
- [![Build Status](https://api.travis-ci.org/cameronjonesweb/facebook-page-feed-graph-api.svg)](https://travis-ci.org/cameronjonesweb/facebook-page-feed-graph-api) [![RIPS CodeRisk](https://coderisk.com/wp/plugin/facebook-page-feed-graph-api/badge "RIPS CodeRisk")](https://coderisk.com/wp/plugin/facebook-page-feed-graph-api)
2
 
3
  # Mongoose Page Plugin
4
 
5
  [![ko-fi](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/E1E0GU12) [![patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://patreon.com/cameronjonesweb)
6
 
7
- The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 95 different languages
8
 
9
 
10
  ## Description
@@ -18,19 +18,19 @@ Other features include:
18
 
19
  * A shortcode generator on the admin dashboard for easy generating of the shortcode
20
 
21
- * Uses your site language by default, but you can display your Facebook page in all 95 languages that Facebook supports, including English, Spanish, Arabic, German, French, Russian and many more
22
 
23
  With more than 30,000 installs and nearly 50 5-star rating, the Mongoose Page Plugin is one of the most popular social media plugins for WordPress.
24
 
25
 
26
  ## Frequently Asked Questions
27
 
 
 
 
28
  ### Where did Mongoose Marketplace come from?
29
  Mongoose Marketplace is a new website just for my plugins. It's still being maintained by the same developer as always, just with new branding.
30
 
31
- ### I can only see a link, the plugin won't load
32
- The two most common causes of the plugin not displaying are an ad blocker, or audience restrictions. Disable or whitelist any ad blocking browser extension and disable any audience restrictions in your page settings on Facebook.
33
-
34
  ### The plugin loads but doesn't show the facepile or posts
35
  The default height of the plugin is only tall enough to display the main page header. Increase the height until you can see the additional features you want to display.
36
 
@@ -46,7 +46,13 @@ On your dashboard. We'll be improving how this is implemented in future versions
46
 
47
  ## Changelog
48
 
49
- ### 1.7.3 - 14/05/20
 
 
 
 
 
 
50
  * Fixed Immediately Invoked Function Expression that was breaking on PHP < 7.0
51
  * Code quality improvements in shortcode render method
52
 
@@ -199,6 +205,8 @@ Available settings:
199
 
200
  `language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
201
 
 
 
202
  * Deprecated Settings *
203
 
204
  `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
1
+ [![Build Status](https://api.travis-ci.org/cameronjonesweb/facebook-page-feed-graph-api.svg)](https://travis-ci.org/cameronjonesweb/facebook-page-feed-graph-api)
2
 
3
  # Mongoose Page Plugin
4
 
5
  [![ko-fi](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/E1E0GU12) [![patreon](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://patreon.com/cameronjonesweb)
6
 
7
+ The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 111 different languages
8
 
9
 
10
  ## Description
18
 
19
  * A shortcode generator on the admin dashboard for easy generating of the shortcode
20
 
21
+ * Uses your site language by default, but you can display your Facebook page in all 111 languages that Facebook supports, including English, Spanish, Arabic, German, French, Russian and many more
22
 
23
  With more than 30,000 installs and nearly 50 5-star rating, the Mongoose Page Plugin is one of the most popular social media plugins for WordPress.
24
 
25
 
26
  ## Frequently Asked Questions
27
 
28
+ ### The plugin doesn't load properly
29
+ The two most common causes of the plugin not displaying are an ad blocker, audience restrictions or browser privacy settings. Disable or whitelist any ad blocking browser extension and disable any audience restrictions in your page settings on Facebook. Some antivirus software has also been known to block Facebook scripts, preventing it from loading. Browsers are also being more proactive in blocking Facebook scripts, so make sure your browser privacy settings are not stopping it from loading.
30
+
31
  ### Where did Mongoose Marketplace come from?
32
  Mongoose Marketplace is a new website just for my plugins. It's still being maintained by the same developer as always, just with new branding.
33
 
 
 
 
34
  ### The plugin loads but doesn't show the facepile or posts
35
  The default height of the plugin is only tall enough to display the main page header. Increase the height until you can see the additional features you want to display.
36
 
46
 
47
  ## Changelog
48
 
49
+ ### 1.8.0 - 20/11/20
50
+ * Updated SDK version
51
+ * Verified compatibility with WordPress 5.5
52
+ * Updated supported locales (RIP Pirate English)
53
+ * Added iframe embed option
54
+
55
+ ### 1.7.3 - 14/04/20
56
  * Fixed Immediately Invoked Function Expression that was breaking on PHP < 7.0
57
  * Code quality improvements in shortcode render method
58
 
205
 
206
  `language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
207
 
208
+ `method` (SDK or iframe embed method, default SDK)
209
+
210
  * Deprecated Settings *
211
 
212
  `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
readme.txt CHANGED
@@ -3,13 +3,13 @@ Contributors: cameronjonesweb, mongoosemarketplace
3
  Tags: like box,facebook like box,facebook page plugin, facebook feed, facebook page
4
  Donate link: https://www.patreon.com/cameronjonesweb
5
  Requires at least: 4.6
6
- Tested up to: 5.4
7
  Requires PHP: 5.3
8
- Stable tag: 1.7.3
9
  License: GPLv2
10
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
 
12
- The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 95 different languages
13
 
14
 
15
  == Description ==
@@ -23,32 +23,24 @@ Other features include:
23
 
24
  * A shortcode generator on the admin dashboard for easy generating of the shortcode
25
 
26
- * Uses your site language by default, but you can display your Facebook page in all 95 languages that Facebook supports, including English, Spanish, Arabic, German, French, Russian and many more
27
 
28
  With more than 30,000 installs and over 50 5-star ratings, the Mongoose Page Plugin is one of the most popular social media plugins for WordPress.
29
 
30
 
31
  == Frequently Asked Questions ==
32
 
33
- = What happened to "Show Posts"? =
34
- 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.
35
 
36
- = What languages are available? =
37
- As of version 1.2.0, the plugin is available in all languages provided by Facebook. By default it uses the same language as the site, but alternatively you can specify the language in the shortcode. The dashboard widget is currently only available in English but is multilingual ready.
38
 
39
- = My Facebook page isn't loading =
40
- 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"]`
41
- Also, if your page has only just been created it may take some time for the API to load the page. Just be patient
42
 
43
- = What versions of WordPress will this plugin work on? =
44
- Shortcodes were introduced in WordPress 2.5, so theorectially it should work on all sites that are at least 2.5, however it has only been tested on versions 4.0 and up, and no guarantee will be made concerning earlier versions
45
-
46
- = I can only see a link, the plugin won't load =
47
- 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.
48
- Additionally, if your Facebook page has audience restrictions for age and/or location, the plugin will not display. If you want the plugin to display, disable the audience restrictions in your page settings on Facebook.
49
-
50
- = I can't get the Facepile to work! =
51
- 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.
52
 
53
 
54
  == Screenshots ==
@@ -59,7 +51,13 @@ Chances are your plugin isn't tall enough to display the facepile properly. The
59
 
60
  == Changelog ==
61
 
62
- = 1.7.3 - 14/05/20 =
 
 
 
 
 
 
63
  * Fixed Immediately Invoked Function Expression that was breaking on PHP < 7.0
64
  * Code quality improvements in shortcode render method
65
 
@@ -212,6 +210,8 @@ Available settings:
212
 
213
  `language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
214
 
 
 
215
  * Deprecated Settings *
216
 
217
  `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
3
  Tags: like box,facebook like box,facebook page plugin, facebook feed, facebook page
4
  Donate link: https://www.patreon.com/cameronjonesweb
5
  Requires at least: 4.6
6
+ Tested up to: 5.5
7
  Requires PHP: 5.3
8
+ Stable tag: 1.8.0
9
  License: GPLv2
10
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11
 
12
+ The most popular way to display the Facebook Page Plugin on your WordPress website. Easy implementation using a shortcode or widget. Now available in 111 different languages
13
 
14
 
15
  == Description ==
23
 
24
  * A shortcode generator on the admin dashboard for easy generating of the shortcode
25
 
26
+ * Uses your site language by default, but you can display your Facebook page in all 111 languages that Facebook supports, including English, Spanish, Arabic, German, French, Russian and many more
27
 
28
  With more than 30,000 installs and over 50 5-star ratings, the Mongoose Page Plugin is one of the most popular social media plugins for WordPress.
29
 
30
 
31
  == Frequently Asked Questions ==
32
 
33
+ = The plugin doesn't load properly =
34
+ The two most common causes of the plugin not displaying are an ad blocker, audience restrictions or browser privacy settings. Disable or whitelist any ad blocking browser extension and disable any audience restrictions in your page settings on Facebook. Some antivirus software has also been known to block Facebook scripts, preventing it from loading. Browsers are also being more proactive in blocking Facebook scripts, so make sure your browser privacy settings are not stopping it from loading.
35
 
36
+ = Where did Mongoose Marketplace come from? =
37
+ Mongoose Marketplace is a new website just for my plugins. It's still being maintained by the same developer as always, just with new branding.
38
 
39
+ = The plugin loads but doesn't show the facepile or posts =
40
+ The default height of the plugin is only tall enough to display the main page header. Increase the height until you can see the additional features you want to display.
 
41
 
42
+ = Where is the shortcode generator? =
43
+ On your dashboard. We'll be improving how this is implemented in future versions.
 
 
 
 
 
 
 
44
 
45
 
46
  == Screenshots ==
51
 
52
  == Changelog ==
53
 
54
+ = 1.8.0 - 20/11/20 =
55
+ * Updated SDK version
56
+ * Verified compatibility with WordPress 5.5
57
+ * Updated supported locales (RIP Pirate English)
58
+ * Added iframe embed option
59
+
60
+ = 1.7.3 - 14/04/20 =
61
  * Fixed Immediately Invoked Function Expression that was breaking on PHP < 7.0
62
  * Code quality improvements in shortcode render method
63
 
210
 
211
  `language` (languageCode_countryCode eg: en_US, language of the plugin, default site language)
212
 
213
+ `method` (SDK or iframe embed method, default SDK)
214
+
215
  * Deprecated Settings *
216
 
217
  `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