Add a new `assertEqualHTML` method to `WP_UnitTestClass` for tests comparing HTML (potentially including block markup).
Internally, the assertion builds a deterministic tree string representation of the markup (using the HTML API) and compares the results. The format of the tree is inspired by the HTML5lib-tests tree format. It is extended with a special representation of block delimiters and their attributes. This format also makes it easier to visually spot the differences between the two strings if the assertion fails.
Finally, this changeset updates `Tests_Dependencies_Scripts` to remove its `assertEqualMarkup` and `parse_markup_fragment` methods, and to use the newly introduced `assertEqualHTML` instead.
Props bernhard-reiter, jonsurrell, dmsnell, jorbin, gziolo.
Fixes#63527.
Built from https://develop.svn.wordpress.org/trunk@60295
git-svn-id: http://core.svn.wordpress.org/trunk@59631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a `pre_post_insert` action hook before inserting a new post via `wp_insert_post()`, allowing developers to modify or inspect post data before insertion. It brings consistency with the `pre_post_update` action hook triggered when a post is updated.
Props Hrohh, peterwilsoncc, audrasjb.
Fixes#63115.
Built from https://develop.svn.wordpress.org/trunk@60293
git-svn-id: http://core.svn.wordpress.org/trunk@59629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Introduces a check in `wp_insert_user()` to ensure the username doesn't have a length of zero after sanitization removes invalid characters.
Props kalpeshh, missveronicatv, rayhatron, rinkalpagdar, sergeybiryukov, thehercules.
Fixes#57635.
Built from https://develop.svn.wordpress.org/trunk@60288
git-svn-id: http://core.svn.wordpress.org/trunk@59624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since r55326, the admin sidebar autocloses on small viewports when focus exits the sidebar. Because of this, there is no case where the Skip to Toolbar link will have any function on small viewports.
Props sabernhardt, abcd95, alh0319, mleray, joedolson.
Fixes#63286.
Built from https://develop.svn.wordpress.org/trunk@60286
git-svn-id: http://core.svn.wordpress.org/trunk@59622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In #24902, an inline script was introduced to `wp_playlist_scripts()`, `wp_audio_shortcode()`, and `wp_video_shortcode()` for HTML5 compatibility in browsers running IE 8 and earlier.
These browsers have long been unsupported by WordPress, and unsupported by Microsoft for 9 years or more. So this compatibility code is no longer necessary and can safely be removed.
Hit the road, Jack, and don't ya come back no more, no more, no more, no more!
Props aslamdoctor, mindctrl, nigelnelles, joedolson.
Fixes#63471.
Built from https://develop.svn.wordpress.org/trunk@60285
git-svn-id: http://core.svn.wordpress.org/trunk@59621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Support autocomplete attributes on user's own profile to improve accessibility. Helps user profile management meet accessibility criteria regarding user input purpose and aids users with mobility impairments.
Props greatislander, umeshsinghin, jorbin, lukasfritzedev, joedolson.
Fixes#63286.
Built from https://develop.svn.wordpress.org/trunk@60283
git-svn-id: http://core.svn.wordpress.org/trunk@59619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix an issue where navigation and search modals triggered an undesirable scroll behavior if triggered while the page was not scrolled all the way to the top.
Props kjellr, nikunj8866, sabernhardt, karmatosed, sainathpoojary, joedolson.
Fixes#52116.
Built from https://develop.svn.wordpress.org/trunk@60280
git-svn-id: http://core.svn.wordpress.org/trunk@59616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The latest MySQL innovation release is now `9.3`, and the latest MariaDB innovation release (also known as a “rolling release”) is `11.7`.
This updates the test matrices and the `.version-support-mysql.json` accordingly.
Props peterwilsoncc.
See #63167.
Built from https://develop.svn.wordpress.org/trunk@60277
git-svn-id: http://core.svn.wordpress.org/trunk@59613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`_deprecated_function()` does not support a custom message, which appears to be redundant here, as the method's DocBlock already indicates that it is unused as of WordPress 5.5.2.
Includes correcting the version in the `@deprecated` tag.
Follow-up to [49146], [49201].
Props dhruvik18, dhruvang21, rollybueno, SirLouen, SergeyBiryukov.
Fixes#63511.
Built from https://develop.svn.wordpress.org/trunk@60273
git-svn-id: http://core.svn.wordpress.org/trunk@59609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the installation screen, focus was set first to the site title field, then moved to the password field. Autofocus should only ever be moved to the first field of a form, so that screen reader users don't miss important fields.
Fix by checking whether the site title field is present before setting password field focus.
Props zodiac1978, himanshupathak95, abcd95, joedolson.
Fixes#63281.
Built from https://develop.svn.wordpress.org/trunk@60268
git-svn-id: http://core.svn.wordpress.org/trunk@59604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset resolves an issue where long usernames in the media uploader modal would overflow their container. By adding the dedicated `word-wrap-break-word` class, usernames now properly break into multiple lines.
Follow-up to [59834], [59835].
Props sainathpoojary, audrasjb, sabernhardt, renishsurani, SirLouen, valentingrenier.
Fixes#63243.
Built from https://develop.svn.wordpress.org/trunk@60266
git-svn-id: http://core.svn.wordpress.org/trunk@59602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a screen reader announcement when a media upload fails. Also add an announcement when dismissing upload errors, and improve the labeling context of the dismiss error button to explicitly identify which error will be dismissed.
Props joedolson, navi161, yogeshbhutkar, rishavdutta.
Fixes#63114.
Built from https://develop.svn.wordpress.org/trunk@60263
git-svn-id: http://core.svn.wordpress.org/trunk@59599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Includes:
* Adding a summary for the method.
* Documenting the `$line` parameter.
* Documenting the case when an empty string is returned.
Follow-up to [7126], [30678], [55714].
Props opurockey, abcd95, SergeyBiryukov.
Fixes#63491.
Built from https://develop.svn.wordpress.org/trunk@60261
git-svn-id: http://core.svn.wordpress.org/trunk@59597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix the color contrast in the post embed template for the post excerpt, site title link, comments count, comments and share icons, continue reading link, and related hover states.
Props rishit30g, sabernhardt, getsyash, swissspidy, SirLouen, joedolson.
Fixes#63460.
Built from https://develop.svn.wordpress.org/trunk@60260
git-svn-id: http://core.svn.wordpress.org/trunk@59596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On small screens, the restore revision button was mostly hidden due to excessive constraints on overflow height. Fix the overflow issue and ensure that restore revision buttons are always usable.
Props yogeshbhutkar, getsyash, joedolson.
Fixes#63029.
Built from https://develop.svn.wordpress.org/trunk@60259
git-svn-id: http://core.svn.wordpress.org/trunk@59595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
User creation is somewhat more expensive since switching the default password hashing algorithm to bcrypt in 6.8. This speeds up the tests by making more use of shared user fixtures, thus reducing the number of users that are created during tests.
Props peterwilsoncc.
See #63026
Built from https://develop.svn.wordpress.org/trunk@60253
git-svn-id: http://core.svn.wordpress.org/trunk@59589 1a063a9b-81f0-0310-95a4-ce76da25c4cd