This documentation describes unreleased changes on the main branch.

Hooks

The framework fires these WordPress hooks. The {slug} is the directory name of the theme or plugin, {namespace} its namespace (see Concepts).

HookKindArgumentsUse
wp_app_framework/init/{slug}actionnoneFired at the end of the boot of an instance. Use it to run code once the framework of a theme or plugin is ready. See Boot.
wp_app_framework/namespace/{namespace}actionnoneFired when an instance claims its namespace; a second instance with the same namespace stops with an error. Not meant for your code.
wp_app_framework/api/{slug}filternull, the class nameThe public API of a plugin or theme (#[PublicApi]). The framework uses it to resolve #[PluginApi] and #[ThemeApi] parameters; do not call it yourself. See Plugins.
wp_app_framework/template/{slug}filternull, 'function' or 'filter', the nameThe public Twig functions and filters of a plugin or theme (public: true). The framework uses it in templates of other instances; do not call it yourself. See Plugins.
wp_app_framework/cache/backends/{slug}filterthe list of backendsThe cache backends of an instance, in order of preference: 'object', 'file', 'transient'; [] turns the cache off. See Cache.
wp_app_framework/cron/{slug}/{name}action (WP-Cron)noneA recurring event (#[CronEvent]). See Cron events and tasks.
wp_app_framework/cron/{slug}/task/{name}action (WP-Cron)the data of the taskA one-time task (#[CronTask]); the framework turns the data back into the task object.
wp_app_framework/cache/clean_up/{slug}action (WP-Cron)noneThe daily clean-up of the file cache and of Twig caches of older releases.

The names and arguments of init, namespace, api and template are a contract between framework versions: instances built with different versions of the framework meet on them, so they only ever grow, also across major versions.

The run-time hooks of WordPress the framework uses itself (init, enqueue_block_assets, rest_api_init …) are not part of its API.