On this page
wp_style_is( string $handle, string $list = 'enqueued' ): bool
Check whether a CSS stylesheet has been added to the queue.
Parameters
$handlestring Required-
Name of the stylesheet.
$liststring Optional-
Status of the stylesheet to check. Default
'enqueued'.
Accepts'enqueued','registered','queue','to_do', and'done'.Default:
'enqueued'
Return
bool Whether style is queued.
Source
File: wp-includes/functions.wp-styles.php. View all references
function wp_style_is( $handle, $list = 'enqueued' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
return (bool) wp_styles()->query( $handle, $list );
}
Related
Uses
| Uses | Description |
|---|---|
| wp_styles() wp-includes/functions.wp-styles.php | Initialize $wp_styles if it has not been set. |
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_style_is