From d274a464163f0de858256bffa89d245b61cca8c2 Mon Sep 17 00:00:00 2001 From: Ali-A-Ali Date: Thu, 4 Apr 2024 14:53:59 +0400 Subject: [PATCH] Compatibility for WP 6.5 and optimize the plugin assets loading method. --- README.md | 12 ++++++++---- alpha-google-map-for-elementor.php | 4 ++-- include/class-alpha-google-map.php | 15 ++++++++++++--- readme.txt | 11 +++++++---- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d13737a..3ff340d 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ Tags: google-map, google, premium, elementor, alpha, page builder, landing page, Requires at least: 6.0 -Tested up to: 6.4 +Tested up to: 6.5 Requires PHP: 7.3 -Stable tag: 1.0.9 +Stable tag: 1.1.0 License: GPLv3 @@ -88,8 +88,8 @@ Manual or using sFTP install: == Upgrade Notice == -= 1.0.9 = -Compatibility for WP 6.4 and bug fix for clicked pins. += 1.1.0 = +Compatibility for WP 6.5 and optimize the plugin assets loading method. == Frequently Asked Questions == @@ -109,6 +109,10 @@ No. You need to install Elementor Website Builder first. == Changelog == += 1.1.0 - 2024-04-04 = + +- Compatibility for WP 6.5 and optimize the plugin assets loading method. + = 1.0.9 - 2023-11-11 = - Compatibility for WP 6.4 and bug fix for clicked pins. diff --git a/alpha-google-map-for-elementor.php b/alpha-google-map-for-elementor.php index 1b7619d..7448a7f 100644 --- a/alpha-google-map-for-elementor.php +++ b/alpha-google-map-for-elementor.php @@ -6,7 +6,7 @@ * Description: Premium Google Map features for WordPress. * Author: Ali Ali * Author URI: https://github.com/Ali7Ali - * Version: 1.0.9 + * Version: 1.1.0 * Text Domain: alpha-google-map-for-elementor * Domain Path: /languages * License: GPLv3 @@ -37,7 +37,7 @@ exit; // Exit if accessed directly. } -define('ALPHAMAP_VERSION', '1.0.9'); +define('ALPHAMAP_VERSION', '1.1.0'); define('ALPHAMAP_ADDONS_PL_ROOT', __FILE__); define('ALPHAMAP_PL_URL', plugins_url('/', ALPHAMAP_ADDONS_PL_ROOT)); define('ALPHAMAP_PL_PATH', plugin_dir_path(ALPHAMAP_ADDONS_PL_ROOT)); diff --git a/include/class-alpha-google-map.php b/include/class-alpha-google-map.php index 11b7f4e..f6373ce 100644 --- a/include/class-alpha-google-map.php +++ b/include/class-alpha-google-map.php @@ -239,8 +239,14 @@ public function plugin_css() public function plugin_js() { // Script register. - wp_enqueue_script('alpha-maps-finder', ALPHAMAP_PL_ASSETS . 'js/pa-maps-finder.js', array('jquery'), ALPHAMAP_VERSION, true); - wp_enqueue_script('alphamap', ALPHAMAP_PL_ASSETS . 'js/alpha-map.js', array('jquery', 'alpha-api-js'), ALPHAMAP_VERSION, true); + wp_enqueue_script('alpha-maps-finder', ALPHAMAP_PL_ASSETS . 'js/pa-maps-finder.js', array('jquery'), ALPHAMAP_VERSION, array( + 'in_footer' => true, + 'strategy' => 'defer', + )); + wp_enqueue_script('alphamap', ALPHAMAP_PL_ASSETS . 'js/alpha-map.js', array('jquery', 'alpha-api-js'), ALPHAMAP_VERSION, array( + 'in_footer' => true, + 'strategy' => 'defer', + )); // get an option. $api_key = get_option('elementor_google_maps_api_key'); @@ -251,7 +257,10 @@ public function plugin_js() $api, array(), '1.0.0', - false + array( + 'in_footer' => true, + 'strategy' => 'defer', + ) ); } diff --git a/readme.txt b/readme.txt index 7f64fd5..0e647e4 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Author: ali7ali Contributors: ali7ali Tags: google-map, google, premium, elementor, alpha, page builder, landing page, drag-and-drop Requires at least: 6.0 -Tested up to: 6.4 +Tested up to: 6.5 Requires PHP: 7.3 -Stable tag: 1.0.9 +Stable tag: 1.1.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -66,8 +66,8 @@ Manual or using sFTP install: == Upgrade Notice == -= 1.0.9 = -Compatibility for WP 6.4 and bug fix for clicked pins. += 1.1.0 = +Compatibility for WP 6.5 and optimize the plugin assets loading method. == Frequently Asked Questions == @@ -87,6 +87,9 @@ No. You need to install Elementor Website Builder first. == Changelog == += 1.1.0 - 2024-04-04 = +* Compatibility for WP 6.5 and optimize the plugin assets loading method. + = 1.0.9 - 2023-11-11 = * Compatibility for WP 6.4 and bug fix for clicked pins.