wp_scripts

Initialize $wp_scripts if it has not been set.

Description

(WP_Scripts) wp_scripts(); 

Returns (WP_Scripts)

WP_Scripts instance.


Usage

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

Defined (1)

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

/wp-includes/functions.wp-scripts.php  
  1. functionwp_scripts) { 
  2. global $wp_scripts; 
  3. if ( ! ( $wp_scripts instanceof WP_Scripts ) ) { 
  4. $wp_scripts = new WP_Scripts(); 
  5. return $wp_scripts;