acf_field__group::load_field
This filter is appied to the $field after it is loaded from the database
Method of the class: acf_field__group{}
No Hooks.
Returns
$field. - the field array holding all the field options
Usage
$acf_field__group = new acf_field__group(); $acf_field__group->load_field( $field );
- $field(required)
- .
Changelog
| Since 3.6 | Introduced. |
acf_field__group::load_field() acf field group::load field code ACF 6.0.4
function load_field( $field ) {
// vars
$sub_fields = acf_get_fields( $field );
// append
if ( $sub_fields ) {
$field['sub_fields'] = $sub_fields;
}
// return
return $field;
}