Skip to content

Commit

Permalink
Events: Specify API key for map (#1094)
Browse files Browse the repository at this point in the history
This is required after WordPress/wporg-mu-plugins@a6027d6
  • Loading branch information
iandunn authored Oct 18, 2023
1 parent 180ae03 commit e476f6c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,7 @@ function render_events_landing_page( array $block_attributes, string $content ):
return 'No events available';
}

$map_options['apiKey'] = 'production' === wp_get_environment_type() ? 'WORDCAMP_PROD_GOOGLE_MAPS_API_KEY' : 'WORDCAMP_DEV_GOOGLE_MAPS_API_KEY';

return do_blocks( '<!-- wp:wporg/google-map '. wp_json_encode( $map_options ) .' /-->' );
}

0 comments on commit e476f6c

Please sign in to comment.