DocumentTitle final class
Minn\Runtime\DocumentTitle · public/minn/src/Minn/Runtime/DocumentTitle.php · 95 lines
The page's title as WordPress's title functions make it from the main query: the document title and its parts (what is shown, the page number, the site or its tagline), and the title tags of a post type archive, a term archive and a single post, printed or returned.
Public
| static | get(): string# | The document title (wp_get_document_title), through the title filters, ready to print inside <title>. |
| static | parts(): array# | The document title's parts from the main query's state: the title of what is shown, the page number past the first, then the tagline on the front page or the site's name elsewhere. @return array<string, mixed> |
| static | postTypeArchive(mixed $prefix = '', mixed $display = true): mixed# | On a post type archive, the type's plural name after a prefix (post_type_archive_title), printed or returned; null elsewhere. |
| static | term(mixed $prefix = '', mixed $display = true): mixed# | The queried term's name after a prefix (single_term_title), printed or returned; null off a term archive. |
| static | post(mixed $prefix = '', mixed $display = true): mixed# | The queried post's title after a prefix (single_post_title), printed or returned; null when no post is queried. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | shown(string $title, mixed $display): ?string# | A title printed (null back) or returned. |
Nothing matches.