QueryClasses final readonly class
Minn\Theme\QueryClasses · public/minn/src/Minn/Theme/QueryClasses.php · 128 lines
The body-class tokens the main query stands for, in the reference's order (captured from the oracles): the view tokens (home, blog, privacy-policy, archive, date, search with its results token, paged, attachment, error404), then the singular's or the archive's own, then the numbered paging tokens. Flags combine as the query's do: a search inside a category carries both sets. The bare paged token follows the listing's page; the numbered ones follow a single's page too, and take the view's prefix in one precedence (single, page, category, tag, date, author, search, post type; the front and a plain taxonomy have none). A 404 carries no paging tokens. The theme renderers seat the numbered tokens after the embed token and add the template and theme tokens.
Constants and properties
| private | readonly Minn\Db $db | Promoted from the constructor. |
Public
Internals 5
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | format(int $id): string# | A post's format by its post_format term, standard without one (probe post-template-remaining). |
| private | singular(WP_Post $post, WP_Query $query): array# | @return list<string> |
| private | archive(WP_Query $query, mixed $object, int $id): array# | @return list<string> |
| private | paging(WP_Query $query): array# | The numbered paging tokens: paged-N and the view's own. @return list<string> |
| private | named(string $name, int $id): string# | A name as a class token, its id when nothing of it survives. |
Nothing matches.