get_stylesheet_directory_uri() WP 1.0
Retrieve stylesheet directory URI.
Works based on: get_theme_root_uri(), get_stylesheet()
Basis of: get_theme_file_uri(), get_stylesheet_uri()
1 time = 0.000068s = very fast | 50000 times = 1.02s = fast | PHP 7.0.2, WP 4.4.1
Hooks from the function
Return
String. URI to current theme's stylesheet directory.
Usage
get_stylesheet_directory_uri();
Changelog
Since 1.5.0 | Introduced. |
Code of get_stylesheet_directory_uri() get stylesheet directory uri WP 5.6
function get_stylesheet_directory_uri() {
$stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
$theme_root_uri = get_theme_root_uri( $stylesheet );
$stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
/**
* Filters the stylesheet directory URI.
*
* @since 1.5.0
*
* @param string $stylesheet_dir_uri Stylesheet directory URI.
* @param string $stylesheet Name of the activated theme's directory.
* @param string $theme_root_uri Themes root URI.
*/
return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
}Related Functions
From tag: theme path (theme folder url)
More from tag: Link (URL)
- admin_url()
- attachment_url_to_postid()
- build_query()
- comment_link()
- content_url()
- get_comments_link()
- get_comments_pagenum_link()
- get_edit_post_link()
- get_edit_term_link()
- get_home_url()
- get_next_comments_link()
- get_post_embed_url()