Created
December 4, 2014 15:46
-
-
Save mwangepatrick/06d2ffc4e0ea1c8ef46e to your computer and use it in GitHub Desktop.
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
function my_acf_get_fields_in_group( $group_id ) { | |
$acf_meta = get_post_custom( $group_id ); | |
$acf_fields = array(); | |
foreach ( $acf_meta as $key => $val ) { | |
if ( preg_match( "/^field_/", $key ) ) { | |
$acf_fields[$key] = $val; | |
} | |
} | |
return $acf_fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks