Skip to main content
Timber

You are reading the documentation for Timber v2.x. Switch to the documentation for Timber v1.x.

Action Hooks

timber_{$object_type}_get_meta_pre #

Filters post meta data before it is fetched from the database.

DEPRECATED since 2.0.0, use timber/{object_type}/pre_meta

timber/loader/render_file #

Fires after …

NameTypeDescription
$resultstring

timber_loader_render_file #

Fires after …

DEPRECATED since 2.0.0, use timber/loader/render_file

This action is used by the Timber Debug Bar extension.

timber/calling_php_file #

Fires after the calling PHP file was determined in Timber’s compile function.

This action is used by the Timber Debug Bar extension.

since 1.1.2

NameTypeDescription
$caller_filestring or nullThe calling script file.

timber/compile/done #

Fires after a Twig template was compiled and before the compiled data is returned.

This action can be helpful if you need to debug Twig template compilation.

since 2.0.0

NameTypeDescription
$outputstringThe compiled output.
$filestringThe name of the Twig template that was compiled.
$dataarrayThe data that was used to compile the Twig template.
$expiresbool or int or arrayThe expiration time of the cache in seconds, or false to disable cache.
$cache_modestringAny of the cache mode constants defined in Timber\Loader.

timber_compile_done #

Fires after a Twig template was compiled and before the compiled data is returned.

DEPRECATED since 2.0.0, use timber/compile/done