[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/ -> script-modules.php (summary)

Script Modules API: Script Module functions

File Size: 175 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  wp_script_modules()
  wp_register_script_module()
  wp_enqueue_script_module()
  wp_dequeue_script_module()
  wp_deregister_script_module()
  wp_default_script_modules()

Functions
Functions that are not part of a class:

wp_script_modules()   X-Ref
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.

return: WP_Script_Modules The main WP_Script_Modules instance.

wp_register_script_module( string $id, string $src, array $deps = array()   X-Ref
Registers the script module if no script module with that script module
identifier has already been registered.

param: string            $id      The identifier of the script module. Should be unique. It will be used in the
param: string            $src     Optional. Full URL of the script module, or path of the script module relative
param: array             $deps    {
param: string|false|null $version Optional. String specifying the script module version number. Defaults to false.

wp_enqueue_script_module( string $id, string $src = '', array $deps = array()   X-Ref
Marks the script module to be enqueued in the page.

If a src is provided and the script module has not been registered yet, it
will be registered.

param: string            $id      The identifier of the script module. Should be unique. It will be used in the
param: string            $src     Optional. Full URL of the script module, or path of the script module relative
param: array             $deps    {
param: string|false|null $version Optional. String specifying the script module version number. Defaults to false.

wp_dequeue_script_module( string $id )   X-Ref
Unmarks the script module so it is no longer enqueued in the page.

param: string $id The identifier of the script module.

wp_deregister_script_module( string $id )   X-Ref
Deregisters the script module.

param: string $id The identifier of the script module.

wp_default_script_modules()   X-Ref
Registers all the default WordPress Script Modules.




Generated : Wed Oct 9 08:20:01 2024 Cross-referenced by PHPXref