WordPress at a glance

wp_style_is() WP 1.0

Check whether a CSS stylesheet has been added to the queue.

No Hooks.

Return

true/false. Whether style is queued.

Usage

wp_style_is( $handle, $list );
$handle(string) (required)
Name of the stylesheet.
$list(string)
Status of the stylesheet to check. Accepts 'enqueued', 'registered', 'queue', 'to_do', and 'done'.
Default: 'enqueued'

Code of wp_style_is: wp-includes/functions.wp-styles.php VER 5.0.1

<?php
function wp_style_is( $handle, $list = 'enqueued' ) {
	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__ );

	return (bool) wp_styles()->query( $handle, $list );
}

Related Functions

From tag: styles (include files)

More from category: Scripts and Styles

No comments
    Hello, !     Log In . Register