get_theme_root_uri()
Retrieve URI for themes directory.
Does not have trailing slash.
Uses: content_url()
1 time — 0.00004 sec (very fast) | 50000 times — 2.11 sec (fast)
Hooks from the function
Return
String
. Themes directory URI.
Usage
get_theme_root_uri( $stylesheet_or_template, $theme_root );
- $stylesheet_or_template(string)
- The stylesheet or template name of the theme.
Default: to leverage the main theme root - $theme_root(string)
- The theme root for which calculations will be based, preventing the need for a get_raw_theme_root() call.
Default: ''
Examples
#1 An example of how the function works
$themes_directory = get_theme_root_uri(); echo $themes_directory; // display: // https://wp-kama.com/wp-content/themes
Notes
- Global. Array. $wp_theme_directories
Changelog
Since 1.5.0 | Introduced. |