Changeset 61402 for trunk/src/wp-includes/functions.wp-scripts.php
- Timestamp:
- 12/22/2025 08:43:17 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/functions.wp-scripts.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.wp-scripts.php
r60948 r61402 142 142 '4.5.0' 143 143 ); 144 $data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );144 $data = trim( (string) preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) ); 145 145 } 146 146 … … 161 161 * @since 6.9.0 The $fetchpriority parameter of type string was added to the $args parameter of type array. 162 162 * 163 * @param string $handleName of the script. Should be unique.164 * @param string|false $srcFull URL of the script, or path of the script relative to the WordPress root directory.165 * If source is set to false, script is an alias of other scripts it depends on.166 * @param string[] $depsOptional. An array of registered script handles this script depends on. Default empty array.167 * @param string|bool|null $verOptional. String specifying script version number, if it has one, which is added to the URL168 * as a query string for cache busting purposes. If version is set to false, a version169 * number is automatically added equal to current installed WordPress version.170 * If set to null, no version is added.171 * @param array |bool $args{163 * @param string $handle Name of the script. Should be unique. 164 * @param string|false $src Full URL of the script, or path of the script relative to the WordPress root directory. 165 * If source is set to false, script is an alias of other scripts it depends on. 166 * @param string[] $deps Optional. An array of registered script handles this script depends on. Default empty array. 167 * @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL 168 * as a query string for cache busting purposes. If version is set to false, a version 169 * number is automatically added equal to current installed WordPress version. 170 * If set to null, no version is added. 171 * @param array<string, string|bool>|bool $args { 172 172 * Optional. An array of additional script loading strategies. Default empty array. 173 173 * Otherwise, it may be a boolean in which case it determines whether the script is printed in the footer. Default false. … … 222 222 * @todo Documentation cleanup 223 223 * 224 * @param string $handle Script handle the data will be attached to.225 * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable.226 * Example: '/[a-zA-Z0-9_]+/'.227 * @param array $l10n The data itself. The data can be either a single or multi-dimensional array.224 * @param string $handle Script handle the data will be attached to. 225 * @param string $object_name Name for the JavaScript object. Passed directly, so it should be qualified JS variable. 226 * Example: '/[a-zA-Z0-9_]+/'. 227 * @param array<string, mixed> $l10n The data itself. The data can be either a single or multi-dimensional array. 228 228 * @return bool True if the script was successfully localized, false otherwise. 229 229 */ … … 347 347 * @since 6.9.0 The $fetchpriority parameter of type string was added to the $args parameter of type array. 348 348 * 349 * @param string $handleName of the script. Should be unique.350 * @param string $srcFull URL of the script, or path of the script relative to the WordPress root directory.351 * Default empty.352 * @param string[] $depsOptional. An array of registered script handles this script depends on. Default empty array.353 * @param string|bool|null $verOptional. String specifying script version number, if it has one, which is added to the URL354 * as a query string for cache busting purposes. If version is set to false, a version355 * number is automatically added equal to current installed WordPress version.356 * If set to null, no version is added.357 * @param array |bool $args{349 * @param string $handle Name of the script. Should be unique. 350 * @param string $src Full URL of the script, or path of the script relative to the WordPress root directory. 351 * Default empty. 352 * @param string[] $deps Optional. An array of registered script handles this script depends on. Default empty array. 353 * @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL 354 * as a query string for cache busting purposes. If version is set to false, a version 355 * number is automatically added equal to current installed WordPress version. 356 * If set to null, no version is added. 357 * @param array<string, string|bool>|bool $args { 358 358 * Optional. An array of additional script loading strategies. Default empty array. 359 359 * Otherwise, it may be a boolean in which case it determines whether the script is printed in the footer. Default false.
Note: See TracChangeset
for help on using the changeset viewer.