google-jsapi, google-maps

May 11, 2021
Darko G.

URL to Google API services.


The filter hook “google-jsapi” and “google-maps” assign the URL to Google API Client Libraries for Google Charts and Google Maps API.



  • $url
    (string) for Google Charts


  • $url
    (string) // for Google Maps

Use case

The following code in your functions.php can override the default value.

function my_google_jsapi( $url ) {
    return '';
function my_google_maps( $url ) {
    return '';
add_filter( 'google-jsapi', 'my_google_jsapi' );
add_filter( 'google-maps',  'my_google_maps'  );
NOTE: When you select "mu-plugins" (ip-location-block-mu.php) as Validation timing , you should put your code snippet into drop-in.php in Geolocation API folder instead of functions.php. See My custom functions in “functions.php” doesn’t work. in FAQ for detail.


Leave a Reply

Your email address will not be published. Required fields are marked *

© 2023 - IP Location Block by IDEOLOGIX Media