-
AuthorPosts
-
July 12, 2016 at 3:00 am #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
July 12, 2016 at 3:38 pm #659942Hey 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 8 years, 4 months ago by Yigit.
July 12, 2016 at 6:28 pm #660013Thanks – 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:
July 12, 2016 at 9:52 pm #660124Hi!
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,
BasilisJuly 13, 2016 at 7:28 am #660210you mean without entering some domains on that point?
July 17, 2016 at 7:05 am #661701Hi!
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,
IsmaelAugust 30, 2016 at 4:26 pm #679550please – 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!September 3, 2016 at 3:39 am #681515Hi,
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,
IsmaelSeptember 4, 2016 at 4:38 pm #681818thanks ismael – i will test it soon.
September 7, 2016 at 2:54 pm #683180Hi,
alright, let us know if it’s working for you or if you still need help with this.
Best regards,
AndyOctober 20, 2016 at 6:39 pm #702035I’m using MapPress Pro. Ismael’s solution worked PERFECTLY for me. Thank you.
As always, WONDERFUL SUPPORT!- This reply was modified 8 years, 1 month ago by Sandy.
-
AuthorPosts
- You must be logged in to reply to this topic.