On older PHP versions, MariaDB version is reported with the `5.5.5-` prefix, e.g. `5.5.5-10.6.24-MariaDB`.
This includes PHP 8.0.15 or earlier, as well as PHP 8.1.0—8.1.2, which was not accounted for previously.
This commit updates the condition for removing the `5.5.5-` prefix to include PHP 8.1.0—8.1.2.
Follow-up to [54384].
Props maximumsoftware, hbhalodia, SergeyBiryukov.
Fixes#64332.
Built from https://develop.svn.wordpress.org/trunk@61349
git-svn-id: http://core.svn.wordpress.org/trunk@60661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Some class names with HTML character references could be mishandled, for example:
- Failure to remove an existing class like `&` with `::remove_class( '&' )`
- Double-encoding of an existing class like `&` after a modification, becoming `&`
The second case manifested after double-encoding prevention was removed from `::set_attribute()` in [60919].
Developed in https://github.com/WordPress/wordpress-develop/pull/10591.
Props jonsurrell, dmsnell.
Fixes#64340.
Built from https://develop.svn.wordpress.org/trunk@61346
git-svn-id: http://core.svn.wordpress.org/trunk@60658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Now that a version of `imagick` with support for PHP 8.5 has been released and the containers maintained by the project for the local development environemnt have been updated to include it, there are some new PHP 8.5 compatibility issues that have surfaced related to HEIF/HEIC image format.
PHP 8.5 added support for the HEIF/HEIC image format in `getimagesize()`. To properly support this in a cross-version way, a few changes are necessary.
Since [58849], WordPress has supported this format and the `IMAGETYPE_HEIC` constant was introduced as a placeholder until proper support was added in PHP. Since that has now happened, this constant needs to be changed to contain a value of `20` instead of `99`, and the name upstream was added as `IMAGETYPE_HEIF`. The constant in Core is being changed to match those included in PHP.
The implementation for this image format in `getimagesize()` also follows a similar pattern to that of AVIF where additional information such as the image `bits` and `channels` are also returned. This additional information is causing unit tests to fail. The tests have been updated to account for different versions of PHP returning a different level of detail.
Props westonruter, skithund, johnbillion, adamsilverstein.
Fixes#64322.
Built from https://develop.svn.wordpress.org/trunk@61328
git-svn-id: http://core.svn.wordpress.org/trunk@60640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This became unnecessary (and confusing) after the plaintext password was removed from the email, and the URL to set a new password was added directly above in WordPress 4.3.
Follow-up to [2872], [8058], [10931], [33023].
Props clayray, manhphucofficial, pratiklondhe, johnbillion, SergeyBiryukov.
Fixes#64316.
Built from https://develop.svn.wordpress.org/trunk@61321
git-svn-id: http://core.svn.wordpress.org/trunk@60633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit removes the `required` attribute from the file input element in the media uploader to avoid browser form validation issues and ensure that the `form` element is submitted correctly.
Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani.
Fixes#64305.
Built from https://develop.svn.wordpress.org/trunk@61320
git-svn-id: http://core.svn.wordpress.org/trunk@60632 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids a PHP warning when `::dirlist()` returns `false` under certain conditions:
> `Warning: Trying to access array offset on value of type bool in wp-admin/includes/class-wp-filesystem-ftpsockets.php on line 326`
Follow-up to [6779], [30678], [45226].
Props apermo, malt3, SergeyBiryukov.
Fixes#63474.
Built from https://develop.svn.wordpress.org/trunk@61311
git-svn-id: http://core.svn.wordpress.org/trunk@60623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Replace regex-based HTML parsing with WP_HTML_Tag_Processor to properly extract text nodes from menu labels. This ensures only root-level text nodes are
collected.
Additionally, replace html_entity_decode() with WP_HTML_Decoder::decode_attribute() with the menu URL for consistent attribute decoding.
Follow-up to [61124], [61126], [61127], [61142].
Props: dmsnell, madhavishah01, peterwilsoncc, wildworks.
Fixes#64233.
Built from https://develop.svn.wordpress.org/trunk@61310
git-svn-id: http://core.svn.wordpress.org/trunk@60622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When retrieving global styles revisions through the REST API, any block style variations (e.g., `styles.blocks.core/group.variations.my-variation`) are being removed during `WP_Theme_JSON` sanitization.
`WP_Theme_JSON` will only allow block style variations that are registered.
This means user modifications to any theme block style variations were being stripped from global styles revisions when retrieved via the REST API.
This commit registers theme-defined block style variations in `WP_REST_Global_Styles_Revisions_Controller::prepare_item_for_response` so that they can be properly parsed by `WP_Theme_JSON`, and therefore added to the global styles revisions REST API GET response.
Props ramonopoly, aaronrobertshaw, ellatrix.
Fixes #64292.
Built from https://develop.svn.wordpress.org/trunk@61301
git-svn-id: http://core.svn.wordpress.org/trunk@60613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This updates various `@var` tags on class properties to correctly indicate that the props may be `null` or unset:
* `WP_Dependencies::$all_queued_deps` is nullable by both `::enqueue()` and `::dequeue`. Also, the types of the keys and values are specified.
* `WP_Duotone::$global_styles_presets` and `::$global_styles_block_names` start off unset and are only initialized by static classes.
* `WP_Query::init()` and `WP_Rewrite::init()` are public methods that `unset()`s many class props.
* `WP_Theme::cache_delete()` sets many props to `null`.
Developed in https://github.com/WordPress/wordpress-develop/pull/8953
Props justlevine, westonruter.
See #64238, #64224.
Built from https://develop.svn.wordpress.org/trunk@61299
git-svn-id: http://core.svn.wordpress.org/trunk@60611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prior to PHP 8.5 a boolean value was silently ignored when being passed to `list()`, but in PHP 8.5 and higher this now triggers a PHP warning. This change adds an appropriate guard condition.
Props swissspidy, adamsilverstein
Fixes#64295
Built from https://develop.svn.wordpress.org/trunk@61291
git-svn-id: http://core.svn.wordpress.org/trunk@60603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Safari only introduced support for alternative text in generated CSS content in version 17.4, released in 2024. This meets the latest two version declared for core browser support. But because `dashicons.css` is commonly required on the front-end for plugins and themes, this support impacts front-end users, and the browser support guidelines for core should not apply in this context.
Follow up to [60885].
Props codex-m, sabernhardt, wildworks, joedolson, desrosj, welcher.
Fixes#64266.
Built from https://develop.svn.wordpress.org/trunk@61290
git-svn-id: http://core.svn.wordpress.org/trunk@60602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [59673], a Grunt subtask was introduced to convert workflow file references in GitHub Action workflows from local ones to remote ones that target the `trunk` branch.
The `workflow-references-local-to-remote` Grunt task should be run after creating a new numbered branch to take advantage of the work started in [58165].
This commit introduces a new target for the `clean` Grunt task: `workflows`. Running `grunt clean:workflows` will delete all workflow files that are not intended to exist outside of `trunk`.
Another Grunt task (`post-branching`) has also been added as a way to group all tasks taht should run within a newly created branch. For now, this contains `clean:workflows` and `replace:workflow-references-local-to-remote`. But more can be added in the future as more aspects of the branching process are automated.
Props johnbillion.
See #64227.
Built from https://develop.svn.wordpress.org/trunk@61286
git-svn-id: http://core.svn.wordpress.org/trunk@60598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Renames the support key to `visibility` to avoid conflicting with the Block Visibility plugin's existing `blockVisibility` key.
Follow-up to [61014].
Props andrewserong, annezazu, cbravobernal, dlh, jorbin, joen, johnjamesjacoby, palak678, ramonopoly, talldanwp, tyxla, wildworks.
Fixes#64272.
Built from https://develop.svn.wordpress.org/trunk@61285
git-svn-id: http://core.svn.wordpress.org/trunk@60597 1a063a9b-81f0-0310-95a4-ce76da25c4cd