API / Minn\Theme / ClassicRenderer

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

privatereadonly Minn\Content\Site $site

Promoted from the constructor.

privatereadonly Minn\Content\Posts $posts

Promoted from the constructor.

privatereadonly Minn\Front\Permalinks $permalinks

Promoted from the constructor.

privatereadonly Minn\Theme\ClassicTheme $theme

Promoted from the constructor.

privatereadonly ?Minn\Theme\Theme $styleTheme

Promoted from the constructor.

privatereadonly Minn\Theme\MainQueryBridge $bridge

Promoted from the constructor.

privatereadonly ?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)#
staticcreate(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.

methodrender(Minn\Front\Resolution $resolution, array $coreClasses): ?string#

The page for a resolution through the theme's PHP templates.

methodthemeClasses(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.

privatetemplate(): string#

The reference's loader order: the first true conditional whose template exists wins, index.php last.

privatebodyClasses(Minn\Front\Resolution $resolution, array $coreClasses): array#
privateregisterHead(): void#

The piece only the renderer holds: the engine stylesheets. The head defaults registered at setup_theme.

privateregisterStyles(): 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.