Filter hook 'stylesheet'

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

View Source

stylesheet

Filter Hook
Description
Filters the name of current stylesheet.

Hook Information

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

Hook Parameters

Type Name Description
string $stylesheet Name of the current stylesheet.

Usage Examples

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

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

Source Code Context

wp-includes/theme.php:189 - How this hook is used in WordPress core
<?php
 184  	 *
 185  	 * @since 1.5.0
 186  	 *
 187  	 * @param string $stylesheet Name of the current stylesheet.
 188  	 */
 189  	return apply_filters( 'stylesheet', get_option( 'stylesheet' ) );
 190  }
 191  
 192  /**
 193   * Retrieves stylesheet directory path for the active theme.
 194   *

PHP Documentation

<?php
/**
	 * Filters the name of current stylesheet.
	 *
	 * @since 1.5.0
	 *
	 * @param string $stylesheet Name of the current stylesheet.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/theme.php
Related Hooks

Related hooks will be displayed here in future updates.