template_directory хук-фильтр . WP 1.5.0
Filters the current theme directory path.
Использование
add_filter( 'template_directory', 'filter_function_name_6040', 10, 3 ); function filter_function_name_6040( $template_dir, $template, $theme_root ){ // filter... return $template_dir; }
- $template_dir(строка)
- The path of the current theme directory.
- $template(строка)
- Directory name of the current theme.
- $theme_root(строка)
- Absolute path to the themes directory.
Список изменений
С версии 1.5.0 | Введена. |
Где вызывается хук
template_directory
wp-includes/theme.php 339
return apply_filters( 'template_directory', $template_dir, $template, $theme_root );