never mind, I was changing the acf-input.js file and forgot that ACF loads the minified version, lol
put the function inside the acf.php file, at the top, like this:
function acf_remove_update_notification( $value ) {
unset( $value->response['acf.php'] );
return $value;
}
add_filter( 'site_transient_update_plugins', 'acf_remove_update_notification' );
this way you don’t have to worry about paths
About moving fields between groups, this is the way I do it:
Export fields to php file
edit the php file and place fields under the desired group
import the groups from the edited php file
not optimal but works fine…
that goes in input.js file where the google map options are, find
// vars
var args = {
zoom : parseInt(this.o.zoom),
center : new google.maps.LatLng(this.o.lat, this.o.lng),
mapTypeId : google.maps.MapTypeId.ROADMAP
};
and add it there like this:
// vars
var args = {
zoom : parseInt(this.o.zoom),
center : new google.maps.LatLng(this.o.lat, this.o.lng),
mapTypeId : google.maps.MapTypeId.ROADMAP,
scrollwheel : false
};
I had to write a converter script to update some fields and this is how I set up the Google map field $value array. Worked fine.
$field_name = "field_53bdd058c84a8";
$value = array("address" => $address, "lat" => $lat, "lng" => $lng, "zoom" => $zoom);
update_field($field_name, $value, $this_ID);
thanks @erictr1ck! I was just looking for such a field… great timing…
I figured out a workaround:
1. Created a field group with no fields.
2. Set location rule for all page templates other than the one with ACF fields
3. Set metaboxes to be visible
Now it works as it should…
@tlexcellent, thanks for the snippet, works great.
I also prefer to pull the zoom value from the map array rather than adding an extra field…
I installed the Location Field add-on from WordPress and that did not correct the issue so I deleted it.
I then installed the Location Field add-on from Github (this fork: https://github.com/fabrizim/acf-location-field) and that corrected the issue. The location field now appears.
I thought the Location field was included in the core…
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.