Changeset 7727
- Timestamp:
- 10/12/2018 02:49:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-misc.php
r7669 r7727 302 302 303 303 // Google Maps API 304 add_filter( 'wordcamp_google_maps_api_key', function( $key ) {304 add_filter( 'wordcamp_google_maps_api_key', function( $key, $scope = 'client' ) { 305 305 $environment = ( defined('WORDCAMP_ENVIRONMENT') ) ? WORDCAMP_ENVIRONMENT : 'development'; 306 306 307 307 switch ( $environment ) { 308 308 case 'production' : 309 if ( defined( 'WORDCAMP_PROD_GOOGLE_MAPS_API_KEY' ) ) {309 if ( $scope === 'client' && defined( 'WORDCAMP_PROD_GOOGLE_MAPS_API_KEY' ) ) { 310 310 $key = WORDCAMP_PROD_GOOGLE_MAPS_API_KEY; 311 } elseif ( $scope === 'server' && defined( 'WORDCAMP_PROD_GOOGLE_MAPS_SERVER_API_KEY') ) { 312 $key = WORDCAMP_PROD_GOOGLE_MAPS_SERVER_API_KEY; 311 313 } 312 314 break; … … 321 323 322 324 return $key; 323 } );325 }, 10, 2 ); 324 326 325 327 /*
Note: See TracChangeset
for help on using the changeset viewer.