diff --git a/.travis.yml b/.travis.yml index 93979eb..99464c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,13 @@ language: php matrix: include: - # Arbitrary PHP version to run the sniffs against. + - php: '5.6' + - php: '7.0' - php: '7.1' + - php: '7.2' + - php: '7.3' + - php: '7.4' + - php: '8.0' before_install: - export PHPCS_DIR=/tmp/phpcs @@ -23,4 +28,4 @@ script: # for example: `--standard=wpcs.xml`. # You can use any of the normal PHPCS command line arguments in the command: # https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage - - $PHPCS_DIR/bin/phpcs -p . --standard=WordPress --extensions=php --runtime-set ignore_warnings_on_exit 1 \ No newline at end of file + - $PHPCS_DIR/bin/phpcs -ps . --standard=WordPress --extensions=php --runtime-set ignore_warnings_on_exit 1 diff --git a/css/admin-global.css b/css/admin-global.css index db509cc..d65b408 100644 --- a/css/admin-global.css +++ b/css/admin-global.css @@ -1,7 +1,52 @@ -#facebook-page-plugin-shortcode-generator p:after{clear:both;display:table;content:" ";} -#facebook-page-plugin-shortcode-generator input:not([type="checkbox"]),#facebook-page-plugin-shortcode-generator select{width:50%;} -#facebook-page-plugin-shortcode-generator input,#facebook-page-plugin-shortcode-generator select{float:right;} -#facebook-page-plugin-shortcode-generator #facebook-page-plugin-shortcode-generator-output{width:100%;float:none;} -.facebook-page-plugin-donate{margin:20px 0 10px;font-size:14px;line-height:175%;background:#fff;border: 1px solid rgba(0,0,0,0.1);border-left:4px solid #46b450;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:1px 29px 1px 12px;position:relative;} -.facebook-page-plugin-donate p{margin:.5em 0;padding:2px;} -.facebook-page-plugin-donate .notice-dismiss{text-decoration:none;} \ No newline at end of file +.facebook-page-plugin-shortcode-generator p { + margin: .5em 0; + padding-bottom: .5em; + border-bottom: 1px solid rgba( 0, 0, 0, .1 ); +} + +.facebook-page-plugin-shortcode-generator p:after { + clear:both; + display:table; + content:""; +} + +.facebook-page-plugin-shortcode-generator input:not([type="checkbox"]), +.facebook-page-plugin-shortcode-generator select { + width:50%; +} + +.wp-admin .facebook-page-plugin-shortcode-generator p label input[type="checkbox"] { + margin-top: 4px; +} + +.facebook-page-plugin-shortcode-generator input, +.facebook-page-plugin-shortcode-generator select { + float:right; +} + +.facebook-page-plugin-shortcode-generator input.facebook-page-plugin-shortcode-generator-output { + width:100%; + float:none; +} + +.facebook-page-plugin-donate { + margin:20px 0 10px; + font-size:14px; + line-height:175%; + background:#fff; + border: 1px solid rgba(0,0,0,0.1); + border-left:4px solid #46b450; + -webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1); + box-shadow:0 1px 1px 0 rgba(0,0,0,.1); + padding:1px 29px 1px 12px; + position:relative; +} + +.facebook-page-plugin-donate p { + margin:.5em 0; + padding:2px; +} + +.facebook-page-plugin-donate .notice-dismiss { + text-decoration:none; +} diff --git a/css/admin-landing-page.css b/css/admin-landing-page.css index 46c9ddf..cefd536 100644 --- a/css/admin-landing-page.css +++ b/css/admin-landing-page.css @@ -1,123 +1,34 @@ -body.settings_page_mongoose-page-plugin { - background: #fff; -} - -.settings_page_mongoose-page-plugin .welcome-panel-content { - margin-right: 13px; -} - -.settings_page_mongoose-page-plugin .welcome-panel-image { - width: 100%; -} - -.settings_page_mongoose-page-plugin .about-description { - margin: 13px 0 0; -} - -.settings_page_mongoose-page-plugin .spinner.is-active { - float: none !important; - margin-left: 0 !important; -} - -.settings_page_mongoose-page-plugin #wpbody-content { - font-family: 'Muli', 'Helvetica', 'Arial', sans-serif; -} - .settings_page_mongoose-page-plugin .page-title { - font-family: 'Rammetto One', cursive; - padding: 0; + margin-bottom: 1rem; } -.settings_page_mongoose-page-plugin h2, -.settings_page_mongoose-page-plugin h3, -.settings_page_mongoose-page-plugin h4, -.settings_page_mongoose-page-plugin h5, -.settings_page_mongoose-page-plugin h6 { - font-family: 'Paytone One', sans-serif; -} - -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__box { - background-color: #f8f3ed; - padding: 20px 25px; - margin-bottom: 20px; - border: none; - box-shadow: none; +.settings_page_mongoose-page-plugin .page-title__icon { + width: 32px; + vertical-align: middle; + margin-right: .5rem; } -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__box p:last-child { - margin-bottom: 0 !important; -} - -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__box .inside { - margin-top: 0; - padding: 0; -} -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__box .inside h2 { - padding-top: 0; -} - -.settings_page_mongoose-page-plugin .notices-placeholder { - visibility: hidden; - height: 0; - overflow: hidden; +.settings_page_mongoose-page-plugin dt { + font-weight: bold; + font-size: 1rem; } -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin { - max-width: 1544px; +.settings_page_mongoose-page-plugin dt p { + font-weight: normal; } -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__banner { - position: relative; +.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__box { + max-width: 600px; } -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__banner:after { - position: absolute; - content: ""; - background-image: url( ../images/banner-border.png ); - background-size: contain; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - background-position: center bottom; - background-repeat: no-repeat; +.settings_page_mongoose-page-plugin .tab-content { + display: none; } -.settings_page_mongoose-page-plugin .mongoose-facebook-page-plugin__banner img { - max-width: 100%; - height: auto; +.settings_page_mongoose-page-plugin .tab-content.active { display: block; } -.mongoose-facebook-page-plugin .button { - border: none; - background: #e46341; - box-shadow: none; - border-radius: 0; - color: #fff; - border: 2px solid #e46341; - padding: 4px 12px; - height: auto; - transition: .2s ease all; - font-family: 'Paytone One', sans-serif; -} - -.mongoose-facebook-page-plugin .button:hover, -.mongoose-facebook-page-plugin .button:focus { - background: transparent; - border: 2px solid #e46341; - color: #e46341; -} - -.settings_page_mongoose-page-plugin #mce-EMAIL { - padding: 4px 12px; - line-height: 28px; -} - -.settings_page_mongoose-page-plugin dt { - font-weight: bold; -} - -.settings_page_mongoose-page-plugin dt p { - font-weight: normal; +.settings_page_mongoose-page-plugin .facebook-page-plugin-shortcode-generator { + max-width: 500px; } diff --git a/facebook-page-feed-graph-api.php b/facebook-page-feed-graph-api.php index 93cef3d..fa1508f 100644 --- a/facebook-page-feed-graph-api.php +++ b/facebook-page-feed-graph-api.php @@ -3,7 +3,7 @@ * Plugin Name: Mongoose Page Plugin * Plugin URI: https://mongoosemarketplace.com/downloads/facebook-page-plugin/ * 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 - * Version: 1.8.3 + * Version: 1.9.0 * Author: Mongoose Marketplace * Author URI: https://mongoosemarketplace.com/ * License: GPLv2 @@ -13,7 +13,7 @@ */ /* -Copyright 2015-2019 Cameron Jones (email : support@mongoosemarketplace.com) +Copyright 2015-2022 Cameron Jones (email : support@mongoosemarketplace.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as diff --git a/images/banner-1544x500.png b/images/banner-1544x500.png deleted file mode 100644 index f3dae82..0000000 Binary files a/images/banner-1544x500.png and /dev/null differ diff --git a/images/banner-border.png b/images/banner-border.png deleted file mode 100644 index 92d0e4b..0000000 Binary files a/images/banner-border.png and /dev/null differ diff --git a/images/mongoose-page-plugin-icon.png b/images/mongoose-page-plugin-icon.png new file mode 100644 index 0000000..a8fcb04 Binary files /dev/null and b/images/mongoose-page-plugin-icon.png differ diff --git a/inc/class-mongoose-page-plugin-shortcode-generator.php b/inc/class-mongoose-page-plugin-shortcode-generator.php index a9b9696..3dfe3aa 100644 --- a/inc/class-mongoose-page-plugin-shortcode-generator.php +++ b/inc/class-mongoose-page-plugin-shortcode-generator.php @@ -32,16 +32,17 @@ public function __construct() { * Create the markup for the shortcode generator */ public function generate() { + wp_enqueue_script( 'facebook-page-plugin-admin-scripts' ); + $return = null; - $return .= Mongoose_Page_Plugin::get_instance()->donate_notice(); $return .= ''; - $return .= '
'; + $return .= ''; $return .= '

'; $return .= '

'; $return .= '

'; $return .= '

'; $return .= '

'; - $return .= '

'; $settings = Mongoose_Page_Plugin::get_instance()->get_settings(); $cjw_fbpp_tabs = $settings['tabs']; if ( ! empty( $cjw_fbpp_tabs ) ) { @@ -65,10 +66,10 @@ public function generate() { } } $return .= '

'; - $return .= ''; + $return .= ''; $return .= '
'; - echo $return; + echo $return; // phpcs:ignore WordPress.Security.EscapeOutput } } diff --git a/inc/class-mongoose-page-plugin.php b/inc/class-mongoose-page-plugin.php index 15390e5..5b3e15f 100644 --- a/inc/class-mongoose-page-plugin.php +++ b/inc/class-mongoose-page-plugin.php @@ -243,7 +243,6 @@ public function files() { */ public function hooks() { // Actions. - add_action( 'wp_dashboard_setup', array( $this, 'facebook_page_plugin_dashboard_widget' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'admin_resources' ) ); add_action( 'admin_init', array( $this, 'remove_donate_notice_nojs' ) ); add_action( 'admin_menu', array( $this, 'landing_page_menu' ) ); @@ -275,14 +274,6 @@ public function activate( $plugin ) { } } - /** - * Filter functions. - */ - private function dashboard_widget_capability() { - $return = apply_filters( 'facebook_page_plugin_dashboard_widget_capability', 'edit_posts' ); - return $return; - } - /** * Get the Facebook App ID * @@ -317,7 +308,7 @@ public function donate_notice( $echo = false ) { } if ( $echo ) { - echo $return; + echo $return; // phpcs:ignore WordPress.Security.EscapeOutput } else { return $return; } @@ -381,25 +372,6 @@ public function register_assets() { public function admin_resources() { wp_enqueue_script( 'facebook-page-plugin-admin-scripts' ); wp_enqueue_style( 'facebook-page-plugin-admin-styles' ); - - } - - /** - * Register the dashboard widget - */ - public function facebook_page_plugin_dashboard_widget() { - if ( current_user_can( $this->dashboard_widget_capability() ) ) { - wp_add_dashboard_widget( 'facebook-page-plugin-shortcode-generator', __( 'Mongoose Page Plugin Shortcode Generator', 'facebook-page-feed-graph-api' ), array( $this, 'dashboard_widget_callback' ) ); - } - } - - /** - * Load the dashboard widget - */ - public function dashboard_widget_callback() { - echo ''; - $generator = new Mongoose_Page_Plugin_Shortcode_Generator(); - $generator->generate(); } /** @@ -409,7 +381,7 @@ public function dashboard_widget_callback() { */ public function landing_page_menu() { add_options_page( - __( 'Mongoose Page Plugin by Mongoose Marketplace', 'facebook-page-feed-graph-api' ), + __( 'Mongoose Page Plugin', 'facebook-page-feed-graph-api' ), 'Mongoose Page Plugin', 'install_plugins', 'mongoose-page-plugin', @@ -425,7 +397,6 @@ public function landing_page_menu() { public function facebook_page_plugin_landing_page() { wp_enqueue_style( 'facebook-page-plugin-landing-page-css' ); wp_enqueue_style( 'facebook-page-plugin-google-fonts' ); - wp_enqueue_script( 'facebook-page-plugin-landing-page-js' ); require_once trailingslashit( $this->dirpath ) . 'inc/templates/landing-page.php'; } @@ -439,7 +410,7 @@ public function facebook_page_plugin_latest_blog_posts_callback() { __( 'Latest plugin news', 'facebook-page-feed-graph-api' ) ); wp_widget_rss_output( 'http://www.rssmix.com/u/13155011/rss.xml', array( 'show_date' => 1 ) ); - wp_die( $links ); + wp_die( $links ); // phpcs:ignore WordPress.Security.EscapeOutput } /** @@ -491,7 +462,10 @@ public function facebook_page_plugin( $filter ) { if ( 'sdk' === $a['method'] ) { - $return .= '
'; + $return .= sprintf( + '
', // phpcs:ignore WordPress.WP.EnqueuedResources.NonEnqueuedScript + esc_attr( $a['language'] ) + ); $return .= sprintf( '
-
-

-
- +
+ %1$s', + esc_html( get_admin_page_title() ), + esc_url( trailingslashit( Mongoose_Page_Plugin::get_instance()->dirurl ) . 'images/mongoose-page-plugin-icon.png' ) + ); + ?> + + +
+

+

+

+

+

+ ', + '', + '' + ); + ?> +

-
+ -
-
-
-
-
-
-

- sections['faq'] ) ) { - $faqs = $plugin_data->sections['faq']; - echo wp_kses_post( $faqs ); - } else { - esc_html_e( 'There was a problem retrieving the FAQs.', 'facebook-page-feed-graph-api' ); - } - ?> -
-
-
-
-
-
-

-

- version ) - ); - ?> -

- sections['changelog'] ) ) { - $changelog = explode( '', $plugin_data->sections['changelog'] ); - if ( ! empty( $changelog ) ) { - $changes = explode( '', $changelog[0] ); - echo wp_kses_post( $changes[1] ); - echo ''; - } - } - printf( - '

%1$s

', - esc_html__( 'View full changelog', 'facebook-page-feed-graph-api' ) - ); - ?> -
-
-
-
-
-
-
-
-

-

- ', esc_url( Mongoose_Page_Plugin::get_instance()->donate_link ) ), - '' - ); - ?> -

-
-
-
-
-

-

- -
-
-
- - - - -
-
-
-
- -
-
-
-
-

-

- %2$s!

', - esc_html__( 'Is this the best plugin for adding a Facebook Page to your WordPress website?', 'facebook-page-feed-graph-api' ), - esc_html__( 'Let me know', 'facebook-page-feed-graph-api' ) - ); - ?> -

-

- Github, on WordPress.org, or email me.', 'facebook-page-feed-graph-api' ), - 'https://github.com/cameronjonesweb/facebook-page-feed-graph-api/issues', - 'https://wordpress.org/support/plugin/facebook-page-feed-graph-api', - 'mailto:support@mongoosemarketplace.com' - ); - ?> -

-
-
-
-
-

-

-

-
-
-
-
-

-
- -
-
-
-
-
-
+
+

+ sections['faq'] ) ) { + $faqs = $plugin_data->sections['faq']; + echo wp_kses_post( $faqs ); + } else { + esc_html_e( 'There was a problem retrieving the FAQs.', 'facebook-page-feed-graph-api' ); + } + ?> +
+
+

+ generate(); ?> +
+
diff --git a/inc/widgets/class-mongoose-page-plugin-facebook-page-widget.php b/inc/widgets/class-mongoose-page-plugin-facebook-page-widget.php index 4f4bd43..6875acd 100644 --- a/inc/widgets/class-mongoose-page-plugin-facebook-page-widget.php +++ b/inc/widgets/class-mongoose-page-plugin-facebook-page-widget.php @@ -33,7 +33,7 @@ class Mongoose_Page_Plugin_Facebook_Page_Widget extends WP_Widget { */ public function __construct() { $this->settings = Mongoose_Page_Plugin::get_instance()->get_settings(); - parent::__construct( 'facebook_page_plugin_widget', __( 'Facebook Page Plugin', 'facebook-page-feed-graph-api' ), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ) ) ); + parent::__construct( 'facebook_page_plugin_widget', __( 'Mongoose Page Plugin: Facebook Page Embed', 'facebook-page-feed-graph-api' ), array( 'description' => __( 'Generates a Facebook Page feed in your widget area', 'facebook-page-feed-graph-api' ) ) ); } /** @@ -382,7 +382,7 @@ public function form( $instance ) { esc_attr( $this->get_field_id( 'language' ) ), esc_html__( 'Language:', 'facebook-page-feed-graph-api' ), esc_attr( $this->get_field_name( 'language' ) ), - call_user_func( + call_user_func( // phpcs:ignore WordPress.Security.EscapeOutput function() use ( $langs, $language ) { $return = ''; foreach ( $langs as $code => $label ) { diff --git a/js/admin-global.js b/js/admin-global.js index c9b8c54..58dd8ff 100644 --- a/js/admin-global.js +++ b/js/admin-global.js @@ -1,113 +1,106 @@ -(function($){ +jQuery(document).ready(function(){ - $(document).ready(function(){ - - $('#facebook-page-plugin-shortcode-generator form').submit(function(e){ - - e.preventDefault(); - - }); + jQuery( '.facebook-page-plugin-shortcode-generator form' ).submit(function(e){ + e.preventDefault(); + }); - var $facebookURLs = ['https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/']; - $('#facebook-page-plugin-shortcode-generator input, #facebook-page-plugin-shortcode-generator select').change(function(){ - if( $('#fbpp-link').prop("checked") == false ) { - $('#linktext-label').hide(); - } else { - $('#linktext-label').show(); + var $facebookURLs = ['https://www.facebook.com/', 'https://facebook.com/', 'www.facebook.com/', 'facebook.com/']; + jQuery('.facebook-page-plugin-shortcode-generator input, .facebook-page-plugin-shortcode-generator select').change(function(){ + console.log('hello'); + if( jQuery('#fbpp-link').prop("checked") == false ) { + jQuery('#linktext-label').hide(); + } else { + jQuery('#linktext-label').show(); + } + var $shortcode = ''; + $shortcode += '[facebook-page-plugin '; + var $href = jQuery('#fbpp-href').val(); + for(i = 0; i < $facebookURLs.length; i++) { + $href = $href.replace($facebookURLs[i],''); + } + if($href.length > 0){ + $shortcode += 'href="' + $href + '" '; + var $width = jQuery('#fbpp-width').val(); + if($width.length > 0){ + $shortcode += 'width="' + $width + '" '; } - var $shortcode = ''; - $shortcode += '[facebook-page-plugin '; - var $href = $('#fbpp-href').val(); - for(i = 0; i < $facebookURLs.length; i++) { - $href = $href.replace($facebookURLs[i],''); + var $height = jQuery('#fbpp-height').val(); + if($height.length > 0){ + $shortcode += 'height="' + $height + '" '; } - if($href.length > 0){ - $shortcode += 'href="' + $href + '" '; - var $width = $('#fbpp-width').val(); - if($width.length > 0){ - $shortcode += 'width="' + $width + '" '; - } - var $height = $('#fbpp-height').val(); - if($height.length > 0){ - $shortcode += 'height="' + $height + '" '; + var $cover = jQuery('#fbpp-cover').prop("checked"); + $shortcode += 'cover="' + $cover + '" '; + var $facepile = jQuery('#fbpp-facepile').prop("checked"); + $shortcode += 'facepile="' + $facepile + '" '; + var $tabs = []; + jQuery('.fbpp-tabs').each(function(){ + if( jQuery(this).prop('checked') == true ) { + $tabs.push( jQuery(this).attr('name' ) ); } - var $cover = $('#fbpp-cover').prop("checked"); - $shortcode += 'cover="' + $cover + '" '; - var $facepile = $('#fbpp-facepile').prop("checked"); - $shortcode += 'facepile="' + $facepile + '" '; - var $tabs = []; - $('.fbpp-tabs').each(function(){ - if( $(this).prop('checked') == true ) { - $tabs.push( $(this).attr('name' ) ); - } - }); - if($tabs.length > 0){ - var $tabstring = ''; - for( $i = 0; $i < $tabs.length; $i++ ) { - $tabstring += $tabs[$i]; - if( $i != $tabs.length - 1 ) { - $tabstring += ',' - } + }); + if($tabs.length > 0){ + var $tabstring = ''; + for( $i = 0; $i < $tabs.length; $i++ ) { + $tabstring += $tabs[$i]; + if( $i != $tabs.length - 1 ) { + $tabstring += ',' } - $shortcode += 'tabs="' + $tabstring + '" '; } - var $cta = $('#fbpp-cta').prop("checked"); - $shortcode += 'cta="' + $cta + '" '; - var $small = $('#fbpp-small').prop("checked"); - $shortcode += 'small="' + $small + '" '; - var $adapt = $('#fbpp-adapt').prop("checked"); - $shortcode += 'adapt="' + $adapt + '" '; - var $link = $('#fbpp-link').prop("checked"); - $shortcode += 'link="' + $link + '" '; - if( $link == true ) { - var $linktext = $('#fbpp-linktext').val(); - $shortcode += 'linktext="' + $linktext + '" '; - } - var $lang = $('#fbpp-lang').val(); - var $method = $('#fbpp-method').val(); - if($method.length > 0){ - $shortcode += 'method="' + $method + '" '; - } - if($lang.length > 0){ - $shortcode += 'language="' + $lang + '" '; - } - $shortcode += ']'; - $('#facebook-page-plugin-shortcode-generator-output').val($shortcode); - + $shortcode += 'tabs="' + $tabstring + '" '; } + var $cta = jQuery('#fbpp-cta').prop("checked"); + $shortcode += 'cta="' + $cta + '" '; + var $small = jQuery('#fbpp-small').prop("checked"); + $shortcode += 'small="' + $small + '" '; + var $adapt = jQuery('#fbpp-adapt').prop("checked"); + $shortcode += 'adapt="' + $adapt + '" '; + var $link = jQuery('#fbpp-link').prop("checked"); + $shortcode += 'link="' + $link + '" '; + if( $link == true ) { + var $linktext = jQuery('#fbpp-linktext').val(); + $shortcode += 'linktext="' + $linktext + '" '; + } + var $lang = jQuery('#fbpp-lang').val(); + var $method = jQuery('#fbpp-method').val(); + if($method.length > 0){ + $shortcode += 'method="' + $method + '" '; + } + if($lang.length > 0){ + $shortcode += 'language="' + $lang + '" '; + } + $shortcode += ']'; + jQuery('.facebook-page-plugin-shortcode-generator-output').val($shortcode); - }); - - jQuery( document ).on( 'click', '.facebook-page-plugin-donate-notice-dismiss', function(e){ - - e.preventDefault(); - - var $notice = jQuery(this).parents('.facebook-page-plugin-donate'); - - jQuery.ajax({ - - type: "POST", - url: ajaxurl, - data: { - - action: 'facebook_page_plugin_remove_donate_notice', - - }, - success: function() { - - $notice.fadeOut(); - - }, - error: function( data ) { - - console.log( data ); - - } + } - }); + }); + jQuery( document ).on( 'click', '.facebook-page-plugin-donate-notice-dismiss', function(e){ + e.preventDefault(); + var $notice = jQuery(this).parents('.facebook-page-plugin-donate'); + jQuery.ajax({ + type: "POST", + url: ajaxurl, + data: { + action: 'facebook_page_plugin_remove_donate_notice', + }, + success: function() { + $notice.fadeOut(); + }, + error: function( data ) { + console.log( data ); + } }); + }); + jQuery( document ).on( 'click', '.settings_page_mongoose-page-plugin .nav-tab', function( e ) { + e.preventDefault(); + $this = jQuery( this ); + $page = jQuery( '.settings_page_mongoose-page-plugin' ); + $page.find( '.tab-content' ).removeClass( 'active' ); + $page.find( '.nav-tab' ).removeClass( 'nav-tab-active' ); + $this.addClass( 'nav-tab-active' ); + $page.find( $this.attr( 'href' ) ).addClass( 'active' ); }); -}(jQuery)); +}); diff --git a/js/admin-landing-page.js b/js/admin-landing-page.js index 72a277b..ccf2deb 100644 --- a/js/admin-landing-page.js +++ b/js/admin-landing-page.js @@ -1,15 +1,2 @@ jQuery( document ).ready( function() { - jQuery.ajax({ - type: "GET", - url: ajaxurl, - data: { - action: 'facebook_page_plugin_latest_blog_posts_callback', - }, - success: function( result ){ - jQuery( '#blog-posts-target' ).html( result ); - }, - error: function( result ) { - jQuery( '#blog-posts-target' ).html( "There was an error retrieving the RSS feed" ); - } - }); }); diff --git a/readme.md b/readme.md index 59b6228..e297a49 100644 --- a/readme.md +++ b/readme.md @@ -1,13 +1,21 @@ # Mongoose Page Plugin Contributors: cameronjonesweb, mongoosemarketplace + Tags: like box,facebook like box,facebook page plugin, facebook feed, facebook page + Donate link: https://www.patreon.com/cameronjonesweb + Requires at least: 4.6 -Tested up to: 5.9 + +Tested up to: 6.1 + Requires PHP: 5.3 -Stable tag: 1.8.2 + +Stable tag: 1.9.0 + License: GPLv2 + License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 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 @@ -36,16 +44,13 @@ With more than 30,000 installs and over 50 5-star rating, the Mongoose Page Plug ## Frequently Asked Questions ### The plugin doesn't load properly -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. - -### Where did Mongoose Marketplace come from? -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. +The 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. ### The plugin loads but doesn't show the facepile or posts 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. ### Where is the shortcode generator? -On your dashboard. We'll be improving how this is implemented in future versions. +As of version 1.9.0, the shortcode generator has moved to Settings > Mongoose Page Plugin > Shortcode Generator ### Is there a Gutenberg block? Not yet, but it is on our roadmap. @@ -59,6 +64,13 @@ Not yet, but it is on our roadmap. ## Changelog +### 1.9.0 - 27/12/22 +* Verified compatibility with WordPress 6.1 +* Updated plugin landing page to match native WordPress admin styles more closely +* Moved shortcode generator from the dashboard to the plugin page +* Coding standards improvements +* Additional security hardening + ### 1.8.3 - 21/03/22 * Verified compatibility with WordPress 5.9 * Fix duplication of a data attribute