Changeset 61362
- Timestamp:
- 12/09/2025 06:52:03 AM (5 days ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
-
class-wp-script-modules.php (modified) (5 diffs)
-
script-modules.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-script-modules.php
r61357 r61362 89 89 * @since 6.9.0 Added the $args parameter. 90 90 * 91 * @param string $id The identifier of the script module. Should be unique. It will be used in the92 * final import map.93 * @param string $src Optional. Full URL of the script module, or path of the script module relative94 * to the WordPress root directory. If it is provided and the script module has95 * not been registered yet, it will be registered.96 * @param array $deps {97 * Optional. List of dependencies.98 * 99 * @type string|array ...$0 {100 * An array of script module identifiers of the dependencies of this script101 * module. The dependencies can be strings or arrays. If they are arrays,102 * they need an `id` key with the script module identifier, and can contain103 * an `import` key with either `static` or `dynamic`. By default,104 * dependencies that don't contain an `import` key are considered static.105 * 106 * @type string $id The script module identifier.107 * @type string $import Optional. Import type. May be either `static` or108 * `dynamic`. Defaults to `static`.109 * }110 * }111 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.112 * It is added to the URL as a query string for cache busting purposes. If $version113 * is set to false, the version number is the currently installed WordPress version.114 * If $version is set to null, no version is added.115 * @param array $args {91 * @param string $id The identifier of the script module. Should be unique. It will be used in the 92 * final import map. 93 * @param string $src Optional. Full URL of the script module, or path of the script module relative 94 * to the WordPress root directory. If it is provided and the script module has 95 * not been registered yet, it will be registered. 96 * @param array<string|array> $deps { 97 * Optional. List of dependencies. 98 * 99 * @type string|array ...$0 { 100 * An array of script module identifiers of the dependencies of this script 101 * module. The dependencies can be strings or arrays. If they are arrays, 102 * they need an `id` key with the script module identifier, and can contain 103 * an `import` key with either `static` or `dynamic`. By default, 104 * dependencies that don't contain an `import` key are considered static. 105 * 106 * @type string $id The script module identifier. 107 * @type string $import Optional. Import type. May be either `static` or 108 * `dynamic`. Defaults to `static`. 109 * } 110 * } 111 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. 112 * It is added to the URL as a query string for cache busting purposes. If $version 113 * is set to false, the version number is the currently installed WordPress version. 114 * If $version is set to null, no version is added. 115 * @param array<string, string|bool> $args { 116 116 * Optional. An array of additional args. Default empty array. 117 117 * … … 261 261 * @since 6.9.0 Added the $args parameter. 262 262 * 263 * @param string $id The identifier of the script module. Should be unique. It will be used in the264 * final import map.265 * @param string $src Optional. Full URL of the script module, or path of the script module relative266 * to the WordPress root directory. If it is provided and the script module has267 * not been registered yet, it will be registered.268 * @param array $deps {269 * Optional. List of dependencies.270 * 271 * @type string|array ...$0 {272 * An array of script module identifiers of the dependencies of this script273 * module. The dependencies can be strings or arrays. If they are arrays,274 * they need an `id` key with the script module identifier, and can contain275 * an `import` key with either `static` or `dynamic`. By default,276 * dependencies that don't contain an `import` key are considered static.277 * 278 * @type string $id The script module identifier.279 * @type string $import Optional. Import type. May be either `static` or280 * `dynamic`. Defaults to `static`.281 * }282 * }283 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.284 * It is added to the URL as a query string for cache busting purposes. If $version285 * is set to false, the version number is the currently installed WordPress version.286 * If $version is set to null, no version is added.287 * @param array $args {263 * @param string $id The identifier of the script module. Should be unique. It will be used in the 264 * final import map. 265 * @param string $src Optional. Full URL of the script module, or path of the script module relative 266 * to the WordPress root directory. If it is provided and the script module has 267 * not been registered yet, it will be registered. 268 * @param array<string|array> $deps { 269 * Optional. List of dependencies. 270 * 271 * @type string|array ...$0 { 272 * An array of script module identifiers of the dependencies of this script 273 * module. The dependencies can be strings or arrays. If they are arrays, 274 * they need an `id` key with the script module identifier, and can contain 275 * an `import` key with either `static` or `dynamic`. By default, 276 * dependencies that don't contain an `import` key are considered static. 277 * 278 * @type string $id The script module identifier. 279 * @type string $import Optional. Import type. May be either `static` or 280 * `dynamic`. Defaults to `static`. 281 * } 282 * } 283 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. 284 * It is added to the URL as a query string for cache busting purposes. If $version 285 * is set to false, the version number is the currently installed WordPress version. 286 * If $version is set to null, no version is added. 287 * @param array<string, string|bool> $args { 288 288 * Optional. An array of additional args. Default empty array. 289 289 * … … 535 535 * @since 6.5.0 536 536 * 537 * @return array Array with an `imports` key mapping to an array of script module identifiers and their respective538 * URLs, including the version query.537 * @return array<string, array<string, string>> Array with an `imports` key mapping to an array of script module 538 * identifiers and their respective URLs, including the version query. 539 539 */ 540 540 private function get_import_map(): array { … … 557 557 * @since 6.5.0 558 558 * 559 * @return array<string, array > Script modules marked for enqueue, keyed by script module identifier.559 * @return array<string, array<string, mixed>> Script modules marked for enqueue, keyed by script module identifier. 560 560 */ 561 561 private function get_marked_for_enqueue(): array { … … 578 578 * @param string[] $import_types Optional. Import types of dependencies to retrieve: 'static', 'dynamic', or both. 579 579 * Default is both. 580 * @return array<string, array > List of dependencies, keyed by script module identifier.580 * @return array<string, array<string, mixed>> List of dependencies, keyed by script module identifier. 581 581 */ 582 582 private function get_dependencies( array $ids, array $import_types = array( 'static', 'dynamic' ) ): array { -
trunk/src/wp-includes/script-modules.php
r61019 r61362 38 38 * @since 6.9.0 Added the $args parameter. 39 39 * 40 * @param string $id The identifier of the script module. Should be unique. It will be used in the41 * final import map.42 * @param string $src Optional. Full URL of the script module, or path of the script module relative43 * to the WordPress root directory. If it is provided and the script module has44 * not been registered yet, it will be registered.45 * @param array $deps {46 * Optional. List of dependencies.47 * 48 * @type string|array ...$0 {49 * An array of script module identifiers of the dependencies of this script50 * module. The dependencies can be strings or arrays. If they are arrays,51 * they need an `id` key with the script module identifier, and can contain52 * an `import` key with either `static` or `dynamic`. By default,53 * dependencies that don't contain an `import` key are considered static.54 * 55 * @type string $id The script module identifier.56 * @type string $import Optional. Import type. May be either `static` or57 * `dynamic`. Defaults to `static`.58 * }59 * }60 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.61 * It is added to the URL as a query string for cache busting purposes. If $version62 * is set to false, the version number is the currently installed WordPress version.63 * If $version is set to null, no version is added.64 * @param array $args {40 * @param string $id The identifier of the script module. Should be unique. It will be used in the 41 * final import map. 42 * @param string $src Optional. Full URL of the script module, or path of the script module relative 43 * to the WordPress root directory. If it is provided and the script module has 44 * not been registered yet, it will be registered. 45 * @param array<string|array> $deps { 46 * Optional. List of dependencies. 47 * 48 * @type string|array ...$0 { 49 * An array of script module identifiers of the dependencies of this script 50 * module. The dependencies can be strings or arrays. If they are arrays, 51 * they need an `id` key with the script module identifier, and can contain 52 * an `import` key with either `static` or `dynamic`. By default, 53 * dependencies that don't contain an `import` key are considered static. 54 * 55 * @type string $id The script module identifier. 56 * @type string $import Optional. Import type. May be either `static` or 57 * `dynamic`. Defaults to `static`. 58 * } 59 * } 60 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. 61 * It is added to the URL as a query string for cache busting purposes. If $version 62 * is set to false, the version number is the currently installed WordPress version. 63 * If $version is set to null, no version is added. 64 * @param array<string, string|bool> $args { 65 65 * Optional. An array of additional args. Default empty array. 66 66 * … … 82 82 * @since 6.9.0 Added the $args parameter. 83 83 * 84 * @param string $id The identifier of the script module. Should be unique. It will be used in the85 * final import map.86 * @param string $src Optional. Full URL of the script module, or path of the script module relative87 * to the WordPress root directory. If it is provided and the script module has88 * not been registered yet, it will be registered.89 * @param array $deps {90 * Optional. List of dependencies.91 * 92 * @type string|array ...$0 {93 * An array of script module identifiers of the dependencies of this script94 * module. The dependencies can be strings or arrays. If they are arrays,95 * they need an `id` key with the script module identifier, and can contain96 * an `import` key with either `static` or `dynamic`. By default,97 * dependencies that don't contain an `import` key are considered static.98 * 99 * @type string $id The script module identifier.100 * @type string $import Optional. Import type. May be either `static` or101 * `dynamic`. Defaults to `static`.102 * }103 * }104 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.105 * It is added to the URL as a query string for cache busting purposes. If $version106 * is set to false, the version number is the currently installed WordPress version.107 * If $version is set to null, no version is added.108 * @param array $args {84 * @param string $id The identifier of the script module. Should be unique. It will be used in the 85 * final import map. 86 * @param string $src Optional. Full URL of the script module, or path of the script module relative 87 * to the WordPress root directory. If it is provided and the script module has 88 * not been registered yet, it will be registered. 89 * @param array<string|array> $deps { 90 * Optional. List of dependencies. 91 * 92 * @type string|array ...$0 { 93 * An array of script module identifiers of the dependencies of this script 94 * module. The dependencies can be strings or arrays. If they are arrays, 95 * they need an `id` key with the script module identifier, and can contain 96 * an `import` key with either `static` or `dynamic`. By default, 97 * dependencies that don't contain an `import` key are considered static. 98 * 99 * @type string $id The script module identifier. 100 * @type string $import Optional. Import type. May be either `static` or 101 * `dynamic`. Defaults to `static`. 102 * } 103 * } 104 * @param string|false|null $version Optional. String specifying the script module version number. Defaults to false. 105 * It is added to the URL as a query string for cache busting purposes. If $version 106 * is set to false, the version number is the currently installed WordPress version. 107 * If $version is set to null, no version is added. 108 * @param array<string, string|bool> $args { 109 109 * Optional. An array of additional args. Default empty array. 110 110 *
Note: See TracChangeset
for help on using the changeset viewer.