W3cubDocs

/WordPress

wp_styles()

Initialize $wp_styles if it has not been set.

Return

(WP_Styles) WP_Styles instance.

Source

File: wp-includes/functions.wp-styles.php

function wp_styles() {
	global $wp_styles;

	if ( ! ( $wp_styles instanceof WP_Styles ) ) {
		$wp_styles = new WP_Styles();
	}

	return $wp_styles;
}

Changelog

Version Description
4.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_styles