apply_filters( 'wp_admin_css', string $stylesheet_link, string $file )
- Since
- 2.3.0
Filters the stylesheet link to the specified CSS file.
Description
If the site is set to display right-to-left, the RTL stylesheet link will be used instead.
Compatibility
- WordPress
- since 2.3.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$stylesheet_linkstring- HTML link element for the stylesheet.
$filestring- Style handle name or filename (without ".css" extension) relative to wp-admin/. Defaults to 'wp-admin'.
Where this hook fires · 2
wp-includes/general-template.php:4926wp_admin_css()wp-includes/general-template.php:4935wp_admin_css()
Source code
* * @since 2.3.0 * @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/. Defaults to 'wp-admin'. */ echo apply_filters( 'wp_admin_css', $stylesheet_link, $file ); if ( function_exists( 'is_rtl' ) && is_rtl() ) { $rtl_stylesheet_link = sprintf( "<link rel='stylesheet' href='%s' type='text/css' />\n", esc_url( wp_admin_css_uri( "$file-rtl" ) ) );Changelog
Introduced in 2.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.