wp_scripts()WP 4.2.0

Initializes $wp_scripts if it has not been set.

No Hooks.

Return

WP_Scripts. WP_Scripts instance.

Usage

wp_scripts();

Notes

  • Global. WP_Scripts. $wp_scripts

Changelog

Since 4.2.0 Introduced.

wp_scripts() code WP 6.5.4

function wp_scripts() {
	global $wp_scripts;

	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
		$wp_scripts = new WP_Scripts();
	}

	return $wp_scripts;
}