wp_style_is( string $handle, string $list = 'enqueued' )
Check whether a CSS stylesheet has been added to the queue.
Description Description
Parameters Parameters
- $handle
-
(string) (Required) Name of the stylesheet.
- $list
-
(string) (Optional) Status of the stylesheet to check. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
Default value: 'enqueued'
Return Return
(bool) Whether style is queued.
Source Source
File: wp-includes/functions.wp-styles.php
function wp_style_is( $handle, $list = 'enqueued' ) { _wp_scripts_maybe_doing_it_wrong( __FUNCTION__ ); return (bool) wp_styles()->query( $handle, $list ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
In old versions of WordPress (checked on 3.1) “enqueued” value of $list param is NOT accepted and results in PHP notices and warnings when strict mode is enabled.