Theme
Class.
Boots the framework for the active theme and provides its paths.
The instance is created only by boot() and handed to the container as a predefined instance: the container never builds it, but services of a theme can inject it to read the paths.
Methods
boot()
Boots the framework. Called once from the theme's functions.php.
Release mode applies if the theme contains generated/manifest.php (created
only by the release build). Otherwise development mode builds the manifest
by reflection and caches it in wp-content/cache/{template}/manifest.
Compiled Twig templates are cached in wp-content/cache/{template}/twig, in
release mode below the template version of the release. At its end, boot()
fires the action wp_app_framework/init/{template}.
Templates are looked up in overrides/{template}/ of the active child
theme, then in the theme's src/, then in the framework. A child theme
with code of its own boots with ChildTheme::boot() instead.
getFrameworkDirectory()
Filesystem path of the framework package; never derive URLs from it.
Returns string
getSlug()
Slug of the theme: its directory name, as returned by get_template().
Returns string
getStylesheetDirectory()
Directory of the active (child) theme, as returned by get_stylesheet_directory().
Returns string
getStylesheetDirectoryUri()
URI of the active (child) theme directory, as returned by get_stylesheet_directory_uri().
Returns string
getTemplateDirectory()
Directory of the parent theme, as returned by get_template_directory().
Returns string
getTemplateDirectoryUri()
URI of the parent theme directory, as returned by get_template_directory_uri().
Returns string