This file contains hidden or 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 | |
add_action( 'acf/init', function() { | |
// Get all the local field groups and loop through them for processing. | |
$field_groups = acf_get_local_field_groups(); | |
foreach ( $field_groups as $group ) { | |
// If the field group has fields, load them into the 'fields' key. | |
if ( acf_have_local_fields( $group['key'] ) ) { | |
$group_fields = acf_get_local_fields( $group['key'] ); |