template_directory_uri WordPress Filter Hook
The template_directory_uri hook is used to retrieve the URL of the current theme's directory. This can be useful when needing to reference theme files such as CSS or JavaScript files.
apply_filters( 'template_directory_uri', string $template_dir_uri , string $template , string $theme_root_uri ) #
Filters the active theme directory URI.
Parameters
- $template_dir_uri
(string)The URI of the active theme directory.
- $template
(string)Directory name of the active theme.
- $theme_root_uri
(string)The themes root URI.
Source
File: wp-includes/theme.php
Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |