For the complete documentation index, see llms.txt. This page is also available as Markdown.

save_acpt_table_group

Create or update a Custom Content Type table group

Create or update a table group — the location/visibility rules for a set of Custom Content Type tables.

Performs an upsert: if a group with the given name already exists (and no id is passed), its existing state is merged with the ones you provide.

Usage

save_acpt_table_group([
    'name'  => 'products_group',
    'label' => 'Products group',
    'location' => [
        [
            'rule'     => 'customPostType',
            'value'    => 'page',
            'operator' => '=',
        ],
    ],
]);

Parameters

Parameter
Type
Required
Description

name

string

Required

Machine name of the table group

id

string

Optional

Existing group UUID (upsert)

label

string

Optional

Human-readable label

display

string

Optional

standard, accordion, verticalTabs, or horizontalTabs

context

string

Optional

Where the group's tables render (mirrors the meta box context concept)

priority

string

Optional

Rendering priority (mirrors the meta box priority concept)

sort

integer

Optional

Sort order among sibling groups

location

array

Optional

Location rule definitions (rule/value/operator/logic) controlling which WordPress context this group appears in

tableIds

array

Optional

IDs of existing tables to attach to this group

Return

Type
Description

bool

true on success, false on failure

Last updated