style_loader_src filter-hookWP 2.6.0

Filters an enqueued style's fully-qualified URL.

Usage

add_filter( 'style_loader_src', 'wp_kama_style_loader_src_filter', 10, 2 );

/**
 * Function for `style_loader_src` filter-hook.
 * 
 * @param string $src    The source URL of the enqueued style.
 * @param string $handle The style's registered handle.
 *
 * @return string
 */
function wp_kama_style_loader_src_filter( $src, $handle ){

	// filter...
	return $src;
}
$src(string)
The source URL of the enqueued style.
$handle(string)
The style's registered handle.

Changelog

Since 2.6.0 Introduced.

Where the hook is called

WP_Styles::_css_href()
style_loader_src
wp-includes/class.wp-styles.php 412
$src = apply_filters( 'style_loader_src', $src, $handle );

Where the hook is used in WordPress

wp-includes/default-filters.php 582
add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );