Assets::register_script( string $handle, string $src, array $deps = array(), bool $has_i18n = true )
Registers a script according to wp_register_script
, additionally loading the translations for the file.
Description Description
Parameters Parameters
- $handle
-
(Required) Name of the script. Should be unique.
- $src
-
(Required) Full URL of the script, or path of the script relative to the WordPress root directory.
- $deps
-
(Optional) An array of registered script handles this script depends on.
Default value: array()
- $has_i18n
-
(Optional) Whether to add a script translation call to this file. Default 'true'.
Default value: true
Source Source
File: woocommerce/packages/woocommerce-blocks/src/Assets.php
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |