Retrieves the main WP_Script_Modules instance.
Description
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;
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.