get_acpt_meta_group_objects
Get an array of field group object representations
Get an array of all field group object representations.
Usage
// All field groups
$groups = get_acpt_meta_group_objects();
// Only groups that apply to a given context
$groups = get_acpt_meta_group_objects([
'belongsTo' => 'customPostType',
'find' => 'page',
]);Parameters
Parameter
Type
Required
Description
belongsTo
string
Optional
Filter to groups scoped to this context (e.g. customPostType, taxonomy, user, optionPage)
find
string
Optional
Further filter to groups whose location rule targets this slug (e.g. a post type slug)
groupName
string
Optional
Filter to a single group by name
All arguments are optional — called with no arguments, every field group is returned.
Return
Type
Description
array
An array of \stdClass objects, one per field group. Returns an empty array if no groups exist
Last updated