Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #659624

    i got a third party google map plugin (MapPress Pro) it has a lot of extra options – so i like to have this one ( and not the, on the moment little buggy enfold one).
    My apprehension is that if i activate my plugin the loading of the google api is started twice and the will disturb each other.
    Is there a possibility to prevent the loading of enfold google api loading?

    Thanks

    #659942

    Hey Guenter,

    Please try adding following code to Functions.php file in Appearance > Editor

    function dereg_gmaps_api() {
    	wp_deregister_script('avia-google-maps-api');
    }
    add_action('init', 'dereg_gmaps_api');

    Best regards,
    Yigit

    • This reply was modified 7 years, 9 months ago by Yigit.
    #660013

    Thanks – i will test it today.

    BTW it seems to be important that on the page we register the api key for maps – the server domains are verified!
    if i only put in the server domains down the key :

    this seems to be not enough.

    on top there is a tab to verify the domains:

    #660124

    Hi!

    I tried and the API key does work without registering the domain.
    I used it to different domains and it worked perfectly.

    The API area, does have an option to make use it withou domain validation, so you can keep it open as it seems…

    Best regards,
    Basilis

    #660210

    you mean without entering some domains on that point?

    #661701

    Hi!

    Yes, I think that’s what @basilis means. I didn’t have the chance to test this thoroughly though. The first time I created an API key, it didn’t work until a site or http referrer has been specified.

    Best regards,
    Ismael

    #679550

    please – this seem not to deregister the loading of the api !

    I has to use it for the third party plugin and before i installed that i want to do this above! But maps api is still loading on that site.

    i tried thris from yigit :

    
    function dereg_gmaps_api() {
    	wp_deregister_script('avia-google-maps-api');
    }
    add_action('init', 'dereg_gmaps_api');

    but with no success – than i have a look to the source where it is loaded.
    well i found that line in google_maps.php line 43 – but there must be other places to find.

    what is the line in shortcodes.js line 431 ff
    the code above is not enough!

    #681515

    Hi,

    Please use this in the functions.php file instead:

    add_action('after_setup_theme', 'ava_disable_gmap');
    function ava_disable_gmap() {
    	add_filter('avf_load_google_map_api', function($load_google_map_api) {
    		$load_google_map_api = false;
    		return $load_google_map_api;
    	},10,1);
    
    	add_filter('avia_google_maps_widget_load_api', function($load_google_map_api) {
    		$load_google_map_api = false;
    		return $load_google_map_api;
    	},10,1);
    }

    Best regards,
    Ismael

    #681818

    thanks ismael – i will test it soon.

    #683180

    Hi,

    alright, let us know if it’s working for you or if you still need help with this.

    Best regards,
    Andy

    #702035

    I’m using MapPress Pro. Ismael’s solution worked PERFECTLY for me. Thank you.
    As always, WONDERFUL SUPPORT!

    • This reply was modified 7 years, 6 months ago by Sandy.
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.