template_directory filter-hook . WP 1.5.0
Filters the current theme directory path.
Usage
add_filter( 'template_directory', 'filter_function_name_4516', 10, 3 ); function filter_function_name_4516( $template_dir, $template, $theme_root ){ // filter... return $template_dir; }
- $template_dir(string)
- The path of the current theme directory.
- $template(string)
- Directory name of the current theme.
- $theme_root(string)
- Absolute path to the themes directory.
Changelog
Since 1.5.0 | Introduced. |
Where the hook is called
template_directory
wp-includes/theme.php 339
return apply_filters( 'template_directory', $template_dir, $template, $theme_root );