Home › Forums › ACF PRO › ACF Google Maps callback error › Reply To: ACF Google Maps callback error
para mi ninguna de estas formas funcionan correctamente. Yo cargo todos los scripts desde functions.php
wp_register_script('google_js',
'https://maps.googleapis.com/maps/api/js?key=API_KEY', true, '3');
wp_enqueue_script('google_js');
wp_register_script('custom-maps', THEME_DIR . '/js/google-maps.js', array('jquery'), true, '1');
wp_enqueue_script('custom-maps');
and I have implemented the callback function as well.
function my_acf_google_map_api( $api ){
$api['key'] = 'API_KEY';
$api['callback'] = 'Function.prototype';
return $api;
}
add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
But I still have the same error
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.