API / Minn\Content / PostClasses

PostClasses final class

Minn\Content\PostClasses · public/minn/src/Minn/Content/PostClasses.php · 52 lines

The class list a post carries on its article element, in the reference's order: caller extras, identity, type, status, format, password state, thumbnail, sticky, hentry, then one class per term of every public taxonomy (post_tag reads as "tag-"; the format's term counts too, as post_format-post-format-aside; probe post-template-remaining).

Public

staticbuild(array $post, array $extra, ?string $format, bool $thumbnail, bool $sticky, bool $passwordRequired, bool $hasPassword, array $terms): array#

The class list a post carries on its article element, in the reference's order.

$extralist<string>
$termslist<array{taxonomy: string, slug: string, term_id: int}>
@return list<string>
statichtmlClass(string $value): string#

The reference keeps letters, digits, hyphens and underscores in a class name.