_acf_do_prepare_local_fields()
_acf_do_prepare_local_fields
Local fields that are added too early will not be correctly prepared by the field type class.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
void. Nothing (null).
Usage
_acf_do_prepare_local_fields();
Changelog
| Since 5.7.10 | Introduced. |
_acf_do_prepare_local_fields() acf do prepare local fields code ACF 6.8.8
function _acf_do_prepare_local_fields() {
// Get fields.
$fields = acf_get_local_fields();
// If fields have been registered early, re-add to correctly prepare them.
if ( $fields ) {
acf_add_local_fields( $fields );
}
}