Last active
May 10, 2018 21:48
-
-
Save craigsimps/d281811caf61543444d7a87a3fd77269 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| 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