API / Minn\Content / ObjectLabels

ObjectLabels final class

Minn\Content\ObjectLabels · public/minn/src/Minn/Content/ObjectLabels.php · 24 lines

A post type's or taxonomy's labels from its own and the defaults (_get_custom_object_labels, probe post-more): the name from its label when unset, the singular from the name, the admin bar from the singular (else the object's name), the menu from the name, all items from the menu, archives from all items; then the defaults (the caller picks the flat or the hierarchical set) under those, in the defaults' order.

Public

staticbuild(array $labels, ?string $label, string $name, array $defaults): array#

The labels, the object's own filled in by the rules above and laid over the defaults.

$labelsarray<string, mixed>the object's own
$defaultsarray<string, mixed>key => the default for this object
@return array<string, mixed>