Last active
January 27, 2020 21:04
-
-
Save Ciantic/02187f3127663ca8002a3acf9517bc5f 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
<?php | |
$groups = acf_get_local_field_groups(); | |
$json = []; | |
foreach ($groups as $group) { | |
$fields = acf_get_fields($group['key']); | |
unset($group['ID']); | |
$group['fields'] = $fields; | |
$json[] = $group; | |
} | |
$json = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); | |
echo $json; | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment