Skip to content

Instantly share code, notes, and snippets.

Last active May 10, 2018
What would you like to do?
define( 'GOOGLE_MAPS_API_KEY', 'your_key_here' );
add_action( 'acf/init', __NAMESPACE__ . '\set_google_maps_api_key' );
* Set Google Maps API key for use in ACF Pro backend.
* @since 1.0.0
function set_google_maps_api_key() {
acf_update_setting( 'google_api_key', GOOGLE_MAPS_API_KEY );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment