google-jsapi, google-maps

URL to Google API services.

Description

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

Parameters

google-apis

google-maps

Use case

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

function my_google_jsapi( $url ) {
    return 'https://www.google.cn/jsapi';
}
function my_google_maps( $url ) {
    return 'https://maps.google.cn/maps/api/js';
}
add_filter( 'google-jsapi', 'my_google_jsapi' );
add_filter( 'google-maps',  'my_google_maps'  );
NOTE: When you select "mu-plugins" (ip-geo-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.

Since

3.0.5

See also