Created
July 19, 2017 12:13
-
-
Save axxe16/f8c683c17ee0d2d3d90f00dafac353b3 to your computer and use it in GitHub Desktop.
API KEY Google per ACF cosa mettere in function.php
This file contains 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 | |
function fix_gmaps_api_key() { | |
if(mb_strlen(acf_get_setting("google_api_key")) <= 0){ | |
acf_update_setting("google_api_key", "AIzaSyDXiH2aFtmW-8TYE2Tyll702wwlwyOsEZQ"); | |
} | |
} | |
add_action( 'admin_enqueue_scripts', 'fix_gmaps_api_key' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment