Page MenuHomeGitPull.it

Remove Google Maps proprietary JavaScript
Closed, ResolvedPublic3 Points

Description

WHY THE FUCK THERE IS A GOOGLE MAPS DEPENDENCY REQUIRED BY THIS FILE:

/wp-content/qt-places/inc/backend/admin_settings.php
if(!get_option('qtmap_disable_googlemaps', false )) {
        $mapsurl = 'https://maps.googleapis.com/maps/api/js';
        $key = get_option("qtGoogleMapsApiKey", false);
        if($key) {
                $mapsurl = add_query_arg("key", esc_attr(trim($key)), $mapsurl);
        }
        wp_enqueue_script('qt-google-maps',$mapsurl, false, false, true);
        $jsdependency[] = 'qt-google-maps';

}

if(!get_option('qtmap_disable_googlemapsjs', false )) {
        wp_enqueue_script('google-jsapi','https://www.google.com/jsapi',$jsdependency); // not needed
        $jsdependency[] = 'google-jsapi';

}

Event Timeline

valerio.bozzolan triaged this task as Unbreak Now! priority.Apr 13 2020, 19:04
valerio.bozzolan created this task.
valerio.bozzolan closed this task as Resolved.Apr 13 2020, 19:06
valerio.bozzolan moved this task from Doing to Done on the Border Radio board.

Fixed with:

UPDATE wp_options SET option_value = 1 WHERE option_name = 'qtmap_disable_googlemaps';
UPDATE wp_options SET option_value = 1 WHERE option_name = 'qtmap_disable_googlemapsjs';
valerio.bozzolan set the point value for this task to 3.Tue, Oct 6, 16:46