acf_get_fields_by_id()
Deprecated since 5.7.11. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
acf_get_fields_by_id
Returns and array of fields for the given $parent_id.
No Hooks.
Returns
Array.
Usage
acf_get_fields_by_id( $parent_id );
- $parent_id(int)
- The parent ID.
Changelog
| Since 5.0.0. | Introduced. |
| Deprecated since | 5.7.11 |
acf_get_fields_by_id() acf get fields by id code ACF 6.0.4
function acf_get_fields_by_id( $parent_id = 0 ) {
// Warning.
_deprecated_function( __FUNCTION__, '5.7.11', 'acf_get_fields()' );
// Return fields.
return acf_get_fields(
array(
'ID' => $parent_id,
'key' => "group_$parent_id",
)
);
}