wp_styles() WordPress Function

The wp_styles() function is used to enqueue or register stylesheets in WordPress. This function should be called in the head section of your theme template.

wp_styles() #

Initialize $wp_styles if it has not been set.


Return

(WP_Styles) WP_Styles instance.


Top ↑

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;
}


Top ↑

Changelog

Changelog
VersionDescription
4.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.