get_stylesheet_directory_uri

Retrieve stylesheet directory URI.

Description

(string) get_stylesheet_directory_uri(); 

Returns (string)


Usage

  1. if ( !function_exists( 'get_stylesheet_directory_uri' ) ) { 
  2. require_once ABSPATH . WPINC . '/theme.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_stylesheet_directory_uri(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/theme.php  
  1. function get_stylesheet_directory_uri() { 
  2. $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) ); 
  3. $theme_root_uri = get_theme_root_uri( $stylesheet ); 
  4. $stylesheet_dir_uri = "$theme_root_uri/$stylesheet"; 
  5.  
  6. /** 
  7. * Filters the stylesheet directory URI. 
  8. * @since 1.5.0 
  9. * @param string $stylesheet_dir_uri Stylesheet directory URI. 
  10. * @param string $stylesheet Name of the activated theme's directory. 
  11. * @param string $theme_root_uri Themes root URI. 
  12. */ 
  13. return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );