AdminTypes final class
Minn\Admin\AdminTypes · public/minn/src/Minn/Admin/AdminTypes.php · 85 lines
Admin-facing type facts (viewable, labels, supports, the edit gate) live beside, not inside, the wp/v2 registry, so the types route's payload stays byte-faithful.
Constants and properties
| private | ?array $extra | |
| private | readonly Minn\Rest\Types $types | Promoted from the constructor. |
| private | readonly Minn\Auth\Capabilities $capabilities | Promoted from the constructor. |
Public
| new | __construct(Minn\Rest\Types $types, Minn\Auth\Capabilities $capabilities)# | |
| method | extra(): array# | The types beyond post and page the app may show, with their labels. |
| method | section(int $userId): array# | The boot-status types section: edit-visible types for this user, slimmed. |
| method | restBaseOf(string $slug): string# | The rest_base of a type slug. |
| method | singularOf(string $slug): string# | A type's singular label. |
| method | editable(): array# | The viewable types a person edits in the app: slug => rest base. @return array<string, string> @return array<string, string> |
| method | commentsEnabled(): bool# | Whether a UI post type still supports comments. |
Nothing matches.