RegisteredType final readonly class
Minn\Rest\RegisteredType · public/minn/src/Minn/Rest/RegisteredType.php · 46 lines
A post type plugin code registered, as its REST object follows it (probe rest-plugin-types): what it supports, whether it is hierarchical, and the taxonomies it shows in REST under their REST bases. Only once the runtime has loaded the plugins that register it.
Constants and properties
| prop | readonly string $name | Promoted from the constructor. |
| private | readonly WP_Post_Type $object | Promoted from the constructor. |
Public
| new | __construct(string $name, WP_Post_Type $object)# | |
| static | of(string $type): ?self# | The type when plugin code registered it (not a built-in), or null. |
| method | supports(string $feature): bool# | Whether the type supports the feature (title, editor, author...). |
| method | hierarchical(): bool# | Whether the type's posts have parents. |
| method | base(): string# | The REST base the type's routes live under, with its namespace. |
| method | taxonomies(): array# | The taxonomies the type shows in REST, REST base => taxonomy, in registration order. @return array<string, string> @return array<string, string> |
Nothing matches.