From dcc5b4d910047bfe27949ab30bcd1c92e901e58b Mon Sep 17 00:00:00 2001 From: Lai Power Date: Mon, 19 Dec 2022 23:08:15 +0000 Subject: [PATCH] updated plugin `GP Premium` version 2.2.2 --- wp-content/plugins/gp-premium/gp-premium.php | 4 +- .../menu-plus/functions/js/offside.js | 40 ++++++++++--------- .../menu-plus/functions/js/offside.min.js | 2 +- wp-content/plugins/gp-premium/readme.txt | 5 ++- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/wp-content/plugins/gp-premium/gp-premium.php b/wp-content/plugins/gp-premium/gp-premium.php index c89a675b..778a7d8c 100644 --- a/wp-content/plugins/gp-premium/gp-premium.php +++ b/wp-content/plugins/gp-premium/gp-premium.php @@ -3,7 +3,7 @@ * Plugin Name: GP Premium * Plugin URI: https://generatepress.com * Description: The entire collection of GeneratePress premium modules. - * Version: 2.2.1 + * Version: 2.2.2 * Requires at least: 5.2 * Requires PHP: 5.6 * Author: Tom Usborne @@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } -define( 'GP_PREMIUM_VERSION', '2.2.1' ); +define( 'GP_PREMIUM_VERSION', '2.2.2' ); define( 'GP_PREMIUM_DIR_PATH', plugin_dir_path( __FILE__ ) ); define( 'GP_PREMIUM_DIR_URL', plugin_dir_url( __FILE__ ) ); define( 'GP_LIBRARY_DIRECTORY', plugin_dir_path( __FILE__ ) . 'library/' ); diff --git a/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.js b/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.js index cfd72e9d..33d0a329 100644 --- a/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.js +++ b/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.js @@ -572,25 +572,6 @@ var generateOffside = offside( '.slideout-navigation', { document.querySelector( '.slideout-navigation:not(.is-open)' ).style.visibility = ''; document.querySelector( '.slideout-navigation:not(.is-open)' ).setAttribute( 'aria-hidden', 'true' ); }, 500 ); - - // Focus our slideout toggle. - if ( window.document.documentElement.clientWidth <= 768 ) { - if ( body.classList.contains( 'slideout-mobile' ) || body.classList.contains( 'slideout-both' ) ) { - document.querySelectorAll( '.main-navigation:not(.slideout-navigation)' ).forEach( function( navigation ) { - if ( navigation && navigation.style.display !== 'none' ) { - navigation.querySelector( '.menu-toggle' ).focus(); - } - } ); - } - } else { - if ( body.classList.contains( 'slideout-desktop' ) || body.classList.contains( 'slideout-both' ) ) { - document.querySelectorAll( '.main-navigation:not(.slideout-navigation)' ).forEach( function( navigation ) { - if ( navigation && navigation.style.display !== 'none' ) { - navigation.querySelector( '.slideout-toggle a' ).focus(); - } - } ); - } - } } } ); @@ -631,6 +612,27 @@ document.addEventListener( 'keyup', function( e ) { if ( e.keyCode == 27 ) { generateOffside.close(); + + var body = document.body; + + // Focus our slideout toggle. + if ( window.document.documentElement.clientWidth <= 768 ) { + if ( body.classList.contains( 'slideout-mobile' ) || body.classList.contains( 'slideout-both' ) ) { + document.querySelectorAll( '.main-navigation:not(.slideout-navigation)' ).forEach( function( navigation ) { + if ( navigation && navigation.style.display !== 'none' ) { + navigation.querySelector( '.menu-toggle' ).focus(); + } + } ); + } + } else { + if ( body.classList.contains( 'slideout-desktop' ) || body.classList.contains( 'slideout-both' ) ) { + document.querySelectorAll( '.main-navigation:not(.slideout-navigation)' ).forEach( function( navigation ) { + if ( navigation && navigation.style.display !== 'none' ) { + navigation.querySelector( '.slideout-toggle a' ).focus(); + } + } ); + } + } } } } ); diff --git a/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js b/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js index 3084ac3b..fa340e5c 100644 --- a/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js +++ b/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js @@ -1 +1 @@ -!function(l,c,u){"use strict";var e={getInstance:function(e,t){return l.offside.factory||(l.offside.factory=n(t)),l.offside.factory.getOffsideInstance(e,t)}};function n(e){var t,h=function(e){0