PostTypeDefinition
in package
Read onlyYes
FinalYes
Declarative custom post type: name it once, get sensible labels and args; `args` overrides anything the convention derives.
Table of Contents
Properties
Methods
- __construct() : mixed
- toArgs() : array<string, mixed>
- The full register_post_type() argument array: derived defaults with the definition's overrides merged on top.
Properties
$args
public
array<string|int, mixed>
$args
= []
$plural
public
string
$plural
$singular
public
string
$singular
$slug
public
string
$slug
Methods
__construct()
public
__construct(non-empty-string $slug, string $singular, string $plural[, array<string, mixed> $args = [] ]) : mixed
Parameters
- $slug : non-empty-string
- $singular : string
- $plural : string
- $args : array<string, mixed> = []
-
overrides merged over the derived defaults
toArgs()
The full register_post_type() argument array: derived defaults with the definition's overrides merged on top.
public
toArgs() : array<string, mixed>