Changeset 61402
- Timestamp:
- 12/22/2025 08:43:17 PM (5 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
-
functions.wp-scripts.php (modified) (4 diffs)
-
functions.wp-styles.php (modified) (2 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. -
trunk/src/wp-includes/functions.wp-styles.php
r60948 r61402 39 39 * @global WP_Styles $wp_styles The WP_Styles object for printing styles. 40 40 * 41 * @param string| bool|array$handles Styles to be printed. Default 'false'.41 * @param string|false|string[] $handles Styles to be printed. Default 'false'. 42 42 * @return string[] On success, an array of handles of processed WP_Dependencies items; otherwise, an empty array. 43 43 */ … … 99 99 '3.7.0' 100 100 ); 101 $data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );101 $data = trim( (string) preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) ); 102 102 } 103 103
Note: See TracChangeset
for help on using the changeset viewer.