wp_admin_css filter-hookWP 2.3.0

Filters the stylesheet link to the specified CSS file.

If the site is set to display right-to-left, the RTL stylesheet link will be used instead.

Usage

add_filter( 'wp_admin_css', 'wp_kama_admin_css_filter', 10, 2 );

/**
 * Function for `wp_admin_css` filter-hook.
 * 
 * @param string $stylesheet_link HTML link element for the stylesheet.
 * @param string $file            Style handle name or filename (without ".css" extension) relative to wp-admin/.
 *
 * @return string
 */
function wp_kama_admin_css_filter( $stylesheet_link, $file ){

	// filter...
	return $stylesheet_link;
}
$stylesheet_link(string)
HTML link element for the stylesheet.
$file(string)
Style handle name or filename (without ".css" extension) relative to wp-admin/.
Default: 'wp-admin'

Changelog

Since 2.3.0 Introduced.

Where the hook is called

wp_admin_css()
wp_admin_css
wp-includes/general-template.php 4892
echo apply_filters( 'wp_admin_css', $stylesheet_link, $file );
wp-includes/general-template.php 4901
echo apply_filters( 'wp_admin_css', $rtl_stylesheet_link, "$file-rtl" );

Where the hook is used in WordPress

Usage not found.