Filter hook 'stylesheet_directory_uri'

in WP Core File wp-includes/theme.php at line 239

View Source

stylesheet_directory_uri

Filter Hook
Description
Filters the stylesheet directory URI.

Hook Information

File Location wp-includes/theme.php View on GitHub
Hook Type Filter
Line Number 239

Hook Parameters

Type Name Description
string $stylesheet_dir_uri Stylesheet directory URI.
string $stylesheet Name of the activated theme's directory.
string $theme_root_uri Themes root URI.

Usage Examples

Basic Usage
<?php
// Hook into stylesheet_directory_uri
add_filter('stylesheet_directory_uri', 'my_custom_filter', 10, 3);

function my_custom_filter($stylesheet_dir_uri, $stylesheet, $theme_root_uri) {
    // Your custom filtering logic here
    return $stylesheet_dir_uri;
}

Source Code Context

wp-includes/theme.php:239 - How this hook is used in WordPress core
<?php
 234  	 *
 235  	 * @param string $stylesheet_dir_uri Stylesheet directory URI.
 236  	 * @param string $stylesheet         Name of the activated theme's directory.
 237  	 * @param string $theme_root_uri     Themes root URI.
 238  	 */
 239  	return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
 240  }
 241  
 242  /**
 243   * Retrieves stylesheet URI for the active theme.
 244   *

PHP Documentation

<?php
/**
	 * 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.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/theme.php
Related Hooks

Related hooks will be displayed here in future updates.