jetpack_google_maps_api_key

Set a Google Maps API Key.

Description

apply_filters( 'jetpack_google_maps_api_key', (string) $instance_apikey ); 

Parameters (1)

0. $instance_apikey (string)
The instance apikey.

Usage

To run the hook, copy the example below.
  1. $instance_apikey = apply_filters( 'jetpack_google_maps_api_key', $instance_apikey ); 
  2.  
  3. if ( !empty( $instance_apikey ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the jetpack_google_maps_api_key callback 
  2. function filter_jetpack_google_maps_api_key( $instance_apikey ) { 
  3. // make filter magic happen here... 
  4. return $instance_apikey
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'jetpack_google_maps_api_key', 'filter_jetpack_google_maps_api_key', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'jetpack_google_maps_api_key', 'filter_jetpack_google_maps_api_key', 10, 1 ); 

Defined (2)

The filter is defined in the following location(s).

/modules/widgets/contact-info.php  
  1. $api_key = apply_filters( 'jetpack_google_maps_api_key', $instance['apikey'] ); 
  1. $key = apply_filters( 'jetpack_google_maps_api_key', $instance['apikey'] );