API / Minn\Runtime / Themes

Themes final class

Minn\Runtime\Themes · public/minn/src/Minn/Runtime/Themes.php · 116 lines

The site's themes as WordPress names and finds them: the active stylesheet and template (as their filters leave them), the themes root on disk and its address, each active theme's folder and its address, a theme by its folder, every installed theme, and the extra roots plugins register.

Public

staticstylesheet(): mixed#

The active theme's folder (get_stylesheet).

statictemplate(): mixed#

The active parent theme's folder (get_template).

staticroot(mixed $stylesheetOrTemplate = ''): mixed#

Where themes live on disk (get_theme_root).

staticrootUri(mixed $stylesheetOrTemplate = '', mixed $themeRoot = ''): mixed#

The themes root's address (get_theme_root_uri).

staticstylesheetDirectory(): mixed#

The active theme's folder on disk (get_stylesheet_directory).

statictemplateDirectory(): mixed#

The active parent theme's folder on disk (get_template_directory).

staticstylesheetDirectoryUri(): mixed#

The active theme's folder address (get_stylesheet_directory_uri).

staticisBlockTheme(): bool#

Whether the current theme is a block theme (wp_is_block_theme): the booted one's answer, or, for a stylesheet a filter swapped in, that theme's own.

staticstylesheetUri(): mixed#

The active theme's stylesheet address (get_stylesheet_uri), as stylesheet_uri leaves it.

statictemplateDirectoryUri(): mixed#

The active parent theme's folder address (get_template_directory_uri).

statictheme(mixed $stylesheet = '', mixed $themeRoot = ''): Minn\Objects\Theme#

A theme by its folder, the active one when none is named (wp_get_theme).

staticall(mixed $args = array ( )): array#

Every installed theme by its folder (wp_get_themes).

@return array<string, Theme>
staticregisterDirectory(mixed $directory): bool#

A further themes root (register_theme_directory), under wp-content when not found as given; false when it is nowhere.