From 4810e616ec56d59c3b9f5b9eaf6f8ac5f455f4fe Mon Sep 17 00:00:00 2001 From: Merv Barrett Date: Tue, 13 Feb 2024 15:20:37 +0800 Subject: [PATCH] Fix: Google Maps async. Prefix added for [listing_map] feature. --- lib/shortcodes/shortcode-listing-map.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/shortcodes/shortcode-listing-map.php b/lib/shortcodes/shortcode-listing-map.php index 1c9005c7..948ce8ac 100644 --- a/lib/shortcodes/shortcode-listing-map.php +++ b/lib/shortcodes/shortcode-listing-map.php @@ -68,16 +68,17 @@ function epl_shortcode_googlemap_callback( $atts, $content = null ) { * Loads google map script on non EPL pages if listing_map shortcode is called. * * @since 3.5.0 + * @since 3.5.3 Google Maps async. Prefix added. */ function epl_shortcode_googlemap_enqueue() { - $googleapiurl = 'https://maps.googleapis.com/maps/api/js?v=3.exp&callback=Function.prototype'; + $googleapiurl = 'https://maps.googleapis.com/maps/api/js?v=3.exp&callback=Function.prototype&loading=async'; $epl_google_api_key = epl_get_option( 'epl_google_api_key' ); if ( ! empty( $epl_google_api_key ) ) { $googleapiurl = $googleapiurl . '&key=' . epl_get_option( 'epl_google_api_key' ); } if ( epl_get_option( 'epl_disable_google_api' ) !== 'on' ) { - wp_enqueue_script( 'google-map-v-3', $googleapiurl, array(), EPL_PROPERTY_VER, false ); + wp_enqueue_script( 'epl-google-map-v-3', $googleapiurl, array(), EPL_PROPERTY_VER, false ); } }