Checks whether a CSS stylesheet has been added to the queue.
Parameters
$handlestringrequired- Name of the stylesheet.
$statusstringoptional- Status of the stylesheet to check. Default
'enqueued'.
Accepts'enqueued','registered','queue','to_do', and'done'.Default:
'enqueued'
Source
function wp_style_is( $handle, $status = 'enqueued' ) {
_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
return (bool) wp_styles()->query( $handle, $status );
}
Changelog
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |
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.