wp_styles

Initialize $wp_styles if it has not been set.

Description

(WP_Styles) wp_styles(); 

Returns (WP_Styles)

WP_Styles instance.


Usage

  1. if ( !function_exists( 'wp_styles' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.wp-styles.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_styles(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.wp-styles.php  
  1. functionwp_styles) { 
  2. global $wp_styles; 
  3. if ( ! ( $wp_styles instanceof WP_Styles ) ) { 
  4. $wp_styles = new WP_Styles(); 
  5. return $wp_styles;