template_directory_uri
Filters the active theme directory URI.
Usage
add_filter( 'template_directory_uri', 'wp_kama_template_directory_uri_filter', 10, 3 ); /** * Function for `template_directory_uri` filter-hook. * * @param string $template_dir_uri The URI of the active theme directory. * @param string $template Directory name of the active theme. * @param string $theme_root_uri The themes root URI. * * @return string */ function wp_kama_template_directory_uri_filter( $template_dir_uri, $template, $theme_root_uri ){ // filter... return $template_dir_uri; }
- $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.
Changelog
Since 1.5.0 | Introduced. |
Where the hook is called
template_directory_uri
wp-includes/theme.php 397
return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri );