get_stylesheet_uri

Retrieves the URI of current theme stylesheet.

Description

(string) get_stylesheet_uri(); 

The stylesheet file name is style.css which is appended to the stylesheet directory URI path. See get_stylesheet_directory_uri().

Returns (string)


Usage

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

Defined (1)

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

/wp-includes/theme.php  
  1. function get_stylesheet_uri() { 
  2. $stylesheet_dir_uri = get_stylesheet_directory_uri(); 
  3. $stylesheet_uri = $stylesheet_dir_uri . '/style.css'; 
  4. /** 
  5. * Filters the URI of the current theme stylesheet. 
  6. * @since 1.5.0 
  7. * @param string $stylesheet_uri Stylesheet URI for the current theme/child theme. 
  8. * @param string $stylesheet_dir_uri Stylesheet directory URI for the current theme/child theme. 
  9. */ 
  10. return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );