Skip to content

Instantly share code, notes, and snippets.

@mgibbs189
Last active October 16, 2015 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgibbs189/c2daea205ea9b99c6993 to your computer and use it in GitHub Desktop.
Save mgibbs189/c2daea205ea9b99c6993 to your computer and use it in GitHub Desktop.
ACF4 get_field() issue when $format_value = false (repeater field with a google_map field inside)
<?php
// repeater field = field_56203ac21790a
get_field( 'field_56203ac21790a', $post_id, $format_value = false );
// result
int(2)
<?php
get_field( 'field_56203ac21790a', $post_id, $format_value = false );
// result
array(2) {
[0]=>
array(1) {
["field_56203acd1790b"]=>
array(3) {
["address"]=>
string(29) "Richmond, Victoria, Australia"
["lat"]=>
string(10) "-37.818635"
["lng"]=>
string(18) "145.00147040000002"
}
}
[1]=>
array(1) {
["field_56203acd1790b"]=>
array(3) {
["address"]=>
string(42) "Inner Harbor, Baltimore, MD, United States"
["lat"]=>
string(10) "39.2858482"
["lng"]=>
string(11) "-76.6131105"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment