Clanbite Since 1.4.0 Updated in 1.5.0

clanbite_normalize_admin_sub_tabs( mixed $items ): array<int, array{id: string, label: string, slotId?: string, sectionGroups?: array<int, array<string, mixed>>}>

Validate sub-tab definitions for the admin bootstrap payload.

Drops entries without an id, label or slot id, entries the current user lacks the capability for, and duplicate ids (first wins), then orders by priority (stable). Used by the admin REST controller; exposed so tests and integrations can reuse the same rules.

Parameters

$items (mixed) Required

Raw list from the clanbite_admin_rest_sub_tabs filter.

Returns

array<int, array{id: string, label: string, slotId?: string, sectionGroups?: array<int, array<string, mixed>>}>

Defined in inc/admin/functions.php

Changelog

VersionDescription
1.5.0Updated.
1.4.0Introduced.