wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_script_modules › WordPress Function

Since6.5.0
Deprecatedn/a
wp_script_modules ( No parameters )
Returns:
  • (WP_Script_Modules) The main WP_Script_Modules instance.
Defined at:
Codex:

Retrieves the main WP_Script_Modules instance.

This function provides access to the WP_Script_Modules instance, creating one if it doesn't exist yet.


Source

function wp_script_modules(): WP_Script_Modules {
	global $wp_script_modules;

	if ( ! ( $wp_script_modules instanceof WP_Script_Modules ) ) {
		$wp_script_modules = new WP_Script_Modules();
	}

	return $wp_script_modules;
}