Hooks

Theme core hooks

before_theme_setup – Before theme core begins to init process
after_theme_setup – After theme has done the init process

before_theme_autoload_modules – Before theme extensions are automatically loaded
after_theme_autoload_modules – After theme extensions are automatically loaded

before_theme_config_set – Before some extension or module config is set using $this->setConfig($config)
after_theme_config_set – After some extension or module config is set using $this->setConfig($config)
before_theme_config_{extensionKey}_get – Before calling for some config using $this->getConfig($key) Replace {extensionKey} with key of extension.

before_theme_module_register – Before some theme extension is registered using theme()->registerModule(…)
after_theme_module_register – After some theme extension is registered using theme()->registerModule(…)

before_theme_get_module – Before getting returning module using theme()->module(…)

before_theme_register_sections – Before sections are registered
on_theme_register_sections – When sections are registered. Note: This is actually used to register sections
after_theme_register_sections – After sections are registered.

before_theme_section_{sectionKey}_render – Before section with given section key renders. Replace {sectionKey} with key of section.
after_theme_section_{sectionKey}_render – After section with given section key renders. Replace {sectionKey} with key of section.

before_theme_render – Before theme starts to render wrapper with sections

before_theme_set_wrapper – Before wrapper is set to template
after_theme_set_wrapper – After wrapper is set to template

before_theme_set_sections – Before sections are set to template
after_theme_set_sections – After sections are set to template

before_theme_get_content – Before theme()->getContent(…) is executed in wrapper
after_theme_get_content – Do something after theme()->getContent(…) is executed in wrapper

before_theme_section_render – Before some section is rendered
after_theme_section_render – After some section is rendered

before_theme_module_init – Before theme module is initialized
after_theme_module_init – After theme module is initialized

before_theme_register_wrappers – Before them wrappers are registered
on_theme_register_wrappers – When theme wrappers are registering. Note: This is used to register wrappers
after_theme_register_wrappers – After theme wrappers are registered

ThemeAssets extension

before_theme_register_assets
after_theme_register_assets

ThemeCache extension

before_theme_cache_init
before_theme_cache_setup_directory
before_theme_flush_old_cache
before_theme_setup_flush_cache
after_theme_setup_flush_cache
after_theme_cache_init

ThemeImage extension

before_theme_register_image-sizes
after_theme_register_image-sizes

ThemeNavigation extension

before_theme_register_navigation
after_theme_register_navigation

ThemeSidebars extension

before_theme_register_sidebars
after_theme_register_sidebars

ThemeSupports extension

before_theme_add_supports
after_theme_add_supports