ClassicRenderer final readonly class
Minn\Theme\ClassicRenderer · public/minn/src/Minn/Theme/ClassicRenderer.php · 125 lines
A whole page from the active classic theme: the reference's PHP template loader. The main query stands, template_redirect fires, the hierarchy picks a PHP file, template_include filters it, and load_template() runs it as the response body. The theme prints its own document; the engine contributes the reference's wp_head defaults (title tag, robots, feed links, REST and oEmbed discovery, canonical, site icon) as hooks the theme's wp_head() call fires.
Constants and properties
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
| private | readonly Minn\Content\Posts $posts | Promoted from the constructor. |
| private | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
| private | readonly Minn\Theme\ClassicTheme $theme | Promoted from the constructor. |
| private | readonly ?Minn\Theme\Theme $styleTheme | Promoted from the constructor. |
| private | readonly Minn\Theme\MainQueryBridge $bridge | Promoted from the constructor. |
| private | readonly ?Minn\Front\AdminBar $bar | Promoted from the constructor. |
Public
| new | __construct(Minn\Content\Site $site, Minn\Content\Posts $posts, Minn\Front\Permalinks $permalinks, Minn\Theme\ClassicTheme $theme, ?Minn\Theme\Theme $styleTheme, Minn\Theme\MainQueryBridge $bridge, ?Minn\Front\AdminBar $bar = NULL)# | |
| static | create(Minn\Db $db, Minn\Theme\ClassicTheme $theme, ?Minn\Theme\Theme $styleTheme, Minn\Front\Permalinks $permalinks, int $perPage, ?Minn\Front\AdminBar $bar = NULL): self# | A classic renderer over the database door. |
| method | render(Minn\Front\Resolution $resolution, array $coreClasses): ?string# | The page for a resolution through the theme's PHP templates. |
| method | themeClasses(Minn\Front\Resolution $resolution, array $coreClasses): array# | The body-class tokens before plugins filter them (get_body_class filters them). @return list<string> @return list<string> |
Internals 4
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | template(): string# | The reference's loader order: the first true conditional whose template exists wins, index.php last. |
| private | bodyClasses(Minn\Front\Resolution $resolution, array $coreClasses): array# | |
| private | registerHead(): void# | The piece only the renderer holds: the engine stylesheets. The head defaults registered at setup_theme. |
| private | registerStyles(): void# | The engine's block stylesheet, and the theme.json presets when the theme ships one, where the reference prints its block-library and global styles. |
Nothing matches.