Last active
October 16, 2015 02:11
-
-
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)
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 | |
// repeater field = field_56203ac21790a | |
get_field( 'field_56203ac21790a', $post_id, $format_value = false ); | |
// result | |
int(2) |
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 | |
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