Commit Graph

49444 Commits

Author SHA1 Message Date
Pascal Birchler d2fb0bd81e General: Remove any usage of `wp_reset_vars()`.
The way `wp_reset_vars()` sets global variables based on `$_POST` and `$_GET` values makes code hard to understand and maintain. It also makes it easy to forget to sanitize input.

This change removes the few places where `wp_reset_vars()` is used in the admin to explicitly use `$_REQUEST` and sanitize any input.

Props swissspidy, audrasjb, davideferre, killua99, weijland, voldemortensen.
Fixes #38073.
Built from https://develop.svn.wordpress.org/trunk@58069


git-svn-id: http://core.svn.wordpress.org/trunk@57534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-01 18:01:12 +00:00
Pascal Birchler 5d6024cefb Script Loader: Ensure `wp_localize_script()` works when called early.
Before, `wp_localize_script()` did not work when the `$wp_scripts` global was not already set (for example because of a script registration happening elsewhere) and even emitted a warning in that case. Due to side effects such as block registration early in the load process, this usually never happened. However, the absence of these side effects in 6.5 caused the `wp_localize_script()` to no longer work in places such as the `login_enqueue_scripts`.

By calling `wp_scripts()` in `wp_localize_script()`, the `$wp_scripts` global is automatically set if needed, restoring previous behavior. Adds both a PHP unit test and an e2e test to verify this use case. Hat tip: jorbin.

Happy birthday, Aaron!

Props salcode, aslamdoctor, jorbin, swissspidy.
Fixes #60862.
Built from https://develop.svn.wordpress.org/trunk@58068


git-svn-id: http://core.svn.wordpress.org/trunk@57533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-05-01 15:42:11 +00:00
Sergey Biryukov 8aa7eb7e16 Coding Standards: Remove extra conditional in `get_plugins()`.
Follow-up to [1894], [5152], [55990].

Props abhijitrakas, mukesh27.
Fixes #44853.
Built from https://develop.svn.wordpress.org/trunk@58067


git-svn-id: http://core.svn.wordpress.org/trunk@57532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 16:45:14 +00:00
Pascal Birchler c3961d849c REST API: allow overriding excerpt length.
This can be used by the excerpt block in the editor to change the excerpt length without filtering `excerpt_length` in a conflicting way. This enhancement still needs a corresponding change on the Gutenberg side.

Props swissspidy, antonvlasenko, mukesh27, azaozz, andraganescu, timothyblynjacobs.
Fixes #59043.
Built from https://develop.svn.wordpress.org/trunk@58065


git-svn-id: http://core.svn.wordpress.org/trunk@57530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 09:33:05 +00:00
Pascal Birchler b2da8bbcc9 I18N: Fix plural usage in `wp_print_admin_notice_templates()`.
Moves the translatable strings from the JS template defined in PHP to the `updates.js` script, where `_n()` can be used as recommended.

Props ideag, SergeyBiryukov, daledupreez, audrasjb, ocean90, swissspidy.
Fixes #37287.
Built from https://develop.svn.wordpress.org/trunk@58064


git-svn-id: http://core.svn.wordpress.org/trunk@57529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:55:04 +00:00
Pascal Birchler 417862e504 Embeds: Remove empty CSS blocks from `wp-embed-template.css`.
Originally added in [34903], these empty CSS blocks serve no purpose.

Props ravipatel, sabernhardt.
Fixes #61085.
Built from https://develop.svn.wordpress.org/trunk@58063


git-svn-id: http://core.svn.wordpress.org/trunk@57528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:44:05 +00:00
Pascal Birchler 7c11d1ebf5 I18N: Actually add all the files for [58061], not just the test fixtures.
Improve support for using only PHP translation files.

This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files.

Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`.

Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format.

See #60554.
Built from https://develop.svn.wordpress.org/trunk@58062


git-svn-id: http://core.svn.wordpress.org/trunk@57527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:39:07 +00:00
Pascal Birchler d0b3d1d7ab I18N: Improve support for using only PHP translation files.
This builds on top of the PHP translation file support added in WordPress 6.5, improving the behavior for projects using solely `.l10n.php` translation files and no `.mo.` and `.po` files.

Updates `wp_get_installed_translations()`, which is used when updating language packs and when uninstalling plugins/themes (to remove the translations again), to look for PHP translation files and read metadata from them. Additionally, the file lookup is now cached thanks to using `WP_Textdomain_Registry`.

Updates `Language_Pack_Upgrader::check_package()` to allow language packs that only contain PHP translation files. While WordPress.org continues to serve `.mo` and `.po` files, third-party services might want to only use the PHP file format.

Props swissspidy.
Fixes #60554.
Built from https://develop.svn.wordpress.org/trunk@58061


git-svn-id: http://core.svn.wordpress.org/trunk@57526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 08:36:09 +00:00
audrasjb 3294fc01ba Help/About: Reduce About screens heading sizes on smaller viewports.
[56950] reduced the heading size of About screen headings, but that did not edit the size for smaller viewports.
This changeset fixes this issue, and also updates the larger fluid font size (960px - 1200px).

Follow-up to [56950].

Props dhruvang21, sabernhardt, khokansardar.
Fixes #61030.



Built from https://develop.svn.wordpress.org/trunk@58060


git-svn-id: http://core.svn.wordpress.org/trunk@57525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 06:59:09 +00:00
isabel_brison a3d497718e Editor: add ticket number to test after string update.
Follow-up to [58028]; adds ticket number to the updated test.

Props jorbin, isabel_brison.
See #60981.

Built from https://develop.svn.wordpress.org/trunk@58059


git-svn-id: http://core.svn.wordpress.org/trunk@57524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-30 04:00:06 +00:00
audrasjb 1abb7e0563 Editor: Add `item_updated` label for `wp_template` and `wp_template_part` post types.
This adds the `item_updated` label to Template and Template Part post types registration. This prevents from displaying the default `post updated` label.
See https://github.com/WordPress/gutenberg/pull/61146 

Follow-up to [52062], [51003].

Props ntsekouras, ellatrix.
Fixes #61095.



Built from https://develop.svn.wordpress.org/trunk@58055


git-svn-id: http://core.svn.wordpress.org/trunk@57520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-29 22:32:08 +00:00
Sergey Biryukov 9a2a3dc5b3 Tests: Use `assertSame()` in `WP_Comment::get_instance()` tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [38381].

Props costdev.
See #60706.
Built from https://develop.svn.wordpress.org/trunk@58054


git-svn-id: http://core.svn.wordpress.org/trunk@57519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-29 15:40:09 +00:00
Tammie Lister 5638ddb0ae Twenty Fourteen: Adds base font size to pullquote block.
The pullquote block needed the base font size adding back in. This also adds in support for appearance settings for weight and style in addition to the original ticket. This fixes a previous commit which changed the default font size of pullquote blocks, quote blocks and blockquotes.

Props sabernhardt.
Fixes #61034.

Built from https://develop.svn.wordpress.org/trunk@58053


git-svn-id: http://core.svn.wordpress.org/trunk@57518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-29 12:17:10 +00:00
Sergey Biryukov a93698699b Tests: Use `assertSame()` in `wp_handle_comment_submission()` tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [38778], [46829].

Props costdev.
See #60706.
Built from https://develop.svn.wordpress.org/trunk@58052


git-svn-id: http://core.svn.wordpress.org/trunk@57517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-28 18:57:14 +00:00
Sergey Biryukov 93116dbd5c Tests: Add more specific messages for a custom assertion in `WP_Test_REST_TestCase`.
All assertions in PHPUnit have a `$message` parameter. Setting this parameter allows to distinguish which assertion is failing when a test runs multiple assertions, making debugging of the tests easier.

Follow-up to [34928], [51478], [58039].

See #60426.
Built from https://develop.svn.wordpress.org/trunk@58051


git-svn-id: http://core.svn.wordpress.org/trunk@57516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-26 15:51:15 +00:00
Adam Silverstein 93978139f0 Media: fix potential error in class-avif-info.php::get_item_features().
Import upstream fix from libavifinfo, correcting a potential fatal error.

Props yguyon.
Fixes #60980.


Built from https://develop.svn.wordpress.org/trunk@58049


git-svn-id: http://core.svn.wordpress.org/trunk@57514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-26 15:02:14 +00:00
dmsnell 4aa1d98bd1 HTML API: Tests should use expectedIncorrectUsage phpunit annotation
Some tests in the HTML API test suite use `setExpectedIncorrectUsage`.
The annotation `@expectedIncorrectUsage` can be used to simplify the tests.

Developed in https://github.com/WordPress/wordpress-develop/pull/6449
Discussed in https://core.trac.wordpress.org/ticket/61080

Fixes #61080.
Props dmsnell, jonsurrell.

Built from https://develop.svn.wordpress.org/trunk@58048


git-svn-id: http://core.svn.wordpress.org/trunk@57513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-26 13:53:15 +00:00
Bernhard Reiter 9c840416cc Tests: Skip Gutenberg plugin activation test on older WP versions.
The purpose of `tests/e2e/specs/gutenberg-plugin.test.js` is to ensure that running the Gutenberg plugin (stable version) on a WordPress `trunk` install doesn't produce any fatals.

The test was introduced in [54913], i.e. it has been around since WP 6.2. It makes sense to have it present on older branches, as the Gutenberg plugin not only supports `trunk`, but also the current stable version of WordPress (i.e. currently 6.5), and one version below (6.4). However, it is not expected to work on any earlier versions beyond that; in practice, it has produced errors on some of those.

This changeset checks the REST API response from the plugin activation request. If it returns an error with error code `plugin_wp_incompatible`, it skips the test.

Props jorbin, johnbillion, swissspidy.
Fixes #60971.
Built from https://develop.svn.wordpress.org/trunk@58046


git-svn-id: http://core.svn.wordpress.org/trunk@57512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-26 10:31:18 +00:00
Sergey Biryukov 2f44f23d92 Docs: Remove extra commas in `WP_User_Query::prepare_query()` DocBlock.
Follow-up to [52226], [58032].

Props nareshbheda, mukesh27.
Fixes #61076.
Built from https://develop.svn.wordpress.org/trunk@58045


git-svn-id: http://core.svn.wordpress.org/trunk@57511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-25 10:49:16 +00:00
Sergey Biryukov dfc568cd20 Tests: Use `assertSame()` in `WP_oEmbed_Controller` tests.
This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [41047].

Props costdev.
See #60706.
Built from https://develop.svn.wordpress.org/trunk@58044


git-svn-id: http://core.svn.wordpress.org/trunk@57510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-24 22:05:18 +00:00
Bernhard Reiter a3f1555919 Block Hooks: Fix `@since` and deprecated versions.
Two `@since` PHPDoc fields, and the version argument to one `_deprecated_argument()` incorrectly stated 6.5.1 as the relevant WordPress version where a change was introduced.

This changeset fixes them by setting them to 6.5.3 instead.

Follow-up to [57919].
See #60754.
Built from https://develop.svn.wordpress.org/trunk@58042


git-svn-id: http://core.svn.wordpress.org/trunk@57508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-24 12:11:15 +00:00
dmsnell f9776f536f HTML API: Fix detection of single-length funky comments.
Since [60428] the Tag Processor has been misidentifying single-character
funky comments. It has been asserting that the full token-length for a
funky comment must be at least three characters after the opening (e.g.
`</1>`), but it has been starting to look for the closing `>` after
those same three characters. This means that it has been skipping the
actual close of these funky comments and swallowing up the next syntax
until it finds a `>`, often consuming the next tag in the process.

This patch fixes the detector and restores finding the following token.

Developed in https://github.com/WordPress/wordpress-develop/pull/6412
Discussed in https://core.trac.wordpress.org/ticket/60170

Follow-up to [60428].
Fixes #60170.
Props dmsnell, gziolo, jonsurrell.

Built from https://develop.svn.wordpress.org/trunk@58040


git-svn-id: http://core.svn.wordpress.org/trunk@57506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-24 07:45:14 +00:00
Sergey Biryukov 9d5f8481df Tests: Add a `$message` parameter for a custom assertion in `WP_Test_REST_TestCase`.
All assertions in PHPUnit have a `$message` parameter. Setting this parameter allows to distinguish which assertion is failing when a test runs multiple assertions, making debugging of the tests easier.

This optional parameter is now added for `WP_Test_REST_TestCase::assertErrorResponse()`.

Follow-up to [34928], [51478].

Props mykolashlyakhtun, antonvlasenko, swissspidy, SergeyBiryukov.
Fixes #60426.
Built from https://develop.svn.wordpress.org/trunk@58039


git-svn-id: http://core.svn.wordpress.org/trunk@57505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-23 18:57:12 +00:00
Pascal Birchler 4d09a87655 Docs: Improve incorrect indentation/alignment in a few docblocks.
See #60699.
Built from https://develop.svn.wordpress.org/trunk@58037


git-svn-id: http://core.svn.wordpress.org/trunk@57503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-23 12:38:14 +00:00
audrasjb 258523f63e Toolbar: Replace "Edit Site" link with "Site Editor" in the Admin Toolbar.
This changesets replaces the "Edit Site" link with "Site Editor" to avoid duplicate link anchors on multisite admin toolbar. The remaining "Edit site" link takes the user to the site editing screen in the network admin area (`network/site-info.php`) while the new "Site Editor" link takes the user to the site editor (`site-editor.php`).

Follow-up to [52158]. See GB27135.

Props johnbillion, sabernhardt, audrasjb, johnjamesjacoby, pratiklondhe.
Fixes #60977.



Built from https://develop.svn.wordpress.org/trunk@58035


git-svn-id: http://core.svn.wordpress.org/trunk@57501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 21:06:08 +00:00
Tammie Lister 0eb5aed212 Twenty Twenty-Three: Wraps navigation block in row within header template part.
This allows inserting of own blocks into header since the release of the Block Hooks API, specifically after the navigation block.

Props tomjcafferkey, poena, shailu25.
Fixes #60723.

Built from https://develop.svn.wordpress.org/trunk@58034


git-svn-id: http://core.svn.wordpress.org/trunk@57500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 20:55:09 +00:00
audrasjb 6371434821 Media: Prevent division by zero in `wp_img_tag_add_width_and_height_attr()`.
This changesets adds a check for `$size_array` values to prevent a potential division by zero.
Follow-up to [57294].

Props jdekhtiar.
Fixes #61054.
See #59352.



Built from https://develop.svn.wordpress.org/trunk@58033


git-svn-id: http://core.svn.wordpress.org/trunk@57499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 20:35:10 +00:00
audrasjb 2d2b97f115 Docs: Typo corrections in class `WP_Meta_Query`.
Props truptikanzariya.
Fixes #61051.
See #60699.



Built from https://develop.svn.wordpress.org/trunk@58032


git-svn-id: http://core.svn.wordpress.org/trunk@57498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 20:25:08 +00:00
Tammie Lister 95533c6f68 Twenty Twelve: Fixes typing errors in block pattern.
There were several instances of typo corrections in block patterns. This removes the last sentence for a simpler resolution.

Props sabernhardt.
Fixes #61004.

Built from https://develop.svn.wordpress.org/trunk@58031


git-svn-id: http://core.svn.wordpress.org/trunk@57497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 20:19:15 +00:00
isabel_brison 9fd435aa15 Editor: fix spacing in function doc.
Correctly formats spacing in `get_layout_styles` docblock.

Props mukesh27, sabernhardt.
See #60981.

Built from https://develop.svn.wordpress.org/trunk@58030


git-svn-id: http://core.svn.wordpress.org/trunk@57496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 07:20:09 +00:00
Sergey Biryukov 4fb8608aa5 Docs: Use correct URL for the Embeds documentation article.
Follow-up to [57793].

Props shailu25, estelaris, audrasjb.
See #60732.
Built from https://develop.svn.wordpress.org/trunk@58029


git-svn-id: http://core.svn.wordpress.org/trunk@57495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 06:25:11 +00:00
isabel_brison 9ecc777ded Editor: limit layout rules on themes without theme.json.
Removes output of base rules for flow and constrained layout types on themes without theme.json.

Props evanltd, poena, isabel_brison, andrewserong, oandregal.
See #60981.

Built from https://develop.svn.wordpress.org/trunk@58028


git-svn-id: http://core.svn.wordpress.org/trunk@57494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 05:30:13 +00:00
Sergey Biryukov 46356f0215 Docs: Remove extra space before `@since` in `WP_Block_Bindings_Registry` DocBlock.
Follow-up to [57373].

Props shailu25.
Fixes #61046.
Built from https://develop.svn.wordpress.org/trunk@58027


git-svn-id: http://core.svn.wordpress.org/trunk@57493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-21 03:52:11 +00:00
Sergey Biryukov 453c78db60 Coding Standards: Use strict comparison in `wp_add_global_styles_for_blocks()`.
Follow-up to [57546].

Props immeet94.
Fixes #60964.
Built from https://develop.svn.wordpress.org/trunk@58026


git-svn-id: http://core.svn.wordpress.org/trunk@57492 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-20 04:01:18 +00:00
Joe McGill 244a8cf308 Themes: Cache block theme patterns in a transient.
This extends the benefits of persistent caching added in [56978] for block theme patterns to sites that are not using a persistent object cache. By default, these caches expire using the value of the `WP_Theme::cache_expiration` property. The transient cache TTL can be overridden using the newly introduced `wp_theme_files_cache_ttl` filter.

Props thekt12, joemcgill, flixos90, peterwilsoncc, spacedmonkey.
See #59600, #59719.

Built from https://develop.svn.wordpress.org/trunk@58025


git-svn-id: http://core.svn.wordpress.org/trunk@57491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-19 17:59:16 +00:00
Sergey Biryukov 670692386b Docs: Fix typo in `WP_Block_Type::__construct()` DocBlock.
Follow-up to [54155].

Props ixkaito.
Fixes #61035.
Built from https://develop.svn.wordpress.org/trunk@58024


git-svn-id: http://core.svn.wordpress.org/trunk@57490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-19 03:42:18 +00:00
Sergey Biryukov 3c5da9c743 Login and Registration: Check that `redirect_to` is a string in `wp-login.php`.
This prevents a fatal error if an array is passed instead.

Follow-up to [2876], [4969], [7524], [8701], [25701], [31417], [49109].

Props TimoTijhof.
Fixes #59373.
Built from https://develop.svn.wordpress.org/trunk@58023


git-svn-id: http://core.svn.wordpress.org/trunk@57489 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-18 06:24:22 +00:00
Peter Wilson f6fae87e73 Upgrade/Install: Validate source & destination values in `WP_Ugrader`.
Adds a missing string and some additional validation of paths in the upgrader class.

Follow up to [56992].

Props costdev, jipmoors, karlijnbok, swissspidy, afragen, mukesh27.
Fixes #59712.


Built from https://develop.svn.wordpress.org/trunk@58022


git-svn-id: http://core.svn.wordpress.org/trunk@57488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-18 03:17:13 +00:00
joedolson cc7370b2af Help/About: Accessibility: Remove `target="_blank"` from data eraser links.
Remove `target="_blank"` from two links to developer resources on adding the personal data eraser to plugins in the Help info for the privacy screens. Also rectifies differences between the export and erase text for consistency and changes the order of paragraphs. 

Props sabernhardt, joedolson.
Fixes #60097.
Built from https://develop.svn.wordpress.org/trunk@58021


git-svn-id: http://core.svn.wordpress.org/trunk@57487 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-17 20:21:15 +00:00
Sergey Biryukov 1c0e271c2f Docs: Correct `@since` version for `COOKIE_DOMAIN` default value change.
Follow-up to [58011].

Props mukesh27.
See #46550.
Built from https://develop.svn.wordpress.org/trunk@58017


git-svn-id: http://core.svn.wordpress.org/trunk@57483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-17 09:46:19 +00:00
Sergey Biryukov dc9dbf913f Users: Set the default value of `COOKIE_DOMAIN` to an empty string.
This matches the type expected by the `setcookie()` function for the `$domain` parameter, and resolves a fatal error if `strict_types` is enabled.

Reference: [https://www.php.net/setcookie PHP Manual: setcookie()].

Follow-up to [2725], [6434], [12732], [13062].

Props kmvan, rajinsharwar, jrf, desrosj, Cybr, nicolefurlan, oglekler, hellofromTonya, kirasong, chaion07, mukesh27.
Fixes #46550.
Built from https://develop.svn.wordpress.org/trunk@58011


git-svn-id: http://core.svn.wordpress.org/trunk@57482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-16 16:52:14 +00:00
dmsnell d2ce038894 HTML API: Validate HTML Processor against external test suite from html5lib.
In this patch, the test suite from html5lib validates the tree-construction
steps in the HTML Processor to ensure that they are behaving according to the
HTML specification. This suite of tests is also used by the servo project to
test its html5ever package.

A new test module in the HTML API transforms HTML Processor output to match
the expected tree shape from the external tests. For cases where there are
tests validating behaviors of unsupported HTML tags and constructs, the tests
are marked as skipped. As the HTML API continues to expand its own support,
the number of skipped tests will automatically shrink down towards zero.

Additional tests are skipped through the `SKIP_TEST` array in the test runner.

Fixes #60227.
See #58517.
Props azaozz, costdev, dmsnell, hellofromtonya, jonsurrell, jorbin, swisspidy.


Built from https://develop.svn.wordpress.org/trunk@58010


git-svn-id: http://core.svn.wordpress.org/trunk@57481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-16 12:08:17 +00:00
Sergey Biryukov dd6d4e74c1 Code Modernization: Fix implicit nullable parameter type deprecation on PHP 8.4.
In PHP 8.4, declaring function or method parameters with a default value of `null` is deprecated if the type is not nullable.

PHP applications are recommended to ''explicitly'' declare the type as nullable. All type declarations that have a default value of `null`, but without declaring `null` in the type declaration, will emit a deprecation notice:
{{{
function test( array $value = null ) {}
}}}
`Deprecated: Implicitly marking parameter $value as nullable is deprecated, the explicit nullable type must be used instead`

**Recommended Changes**

Change the implicit nullable type declaration to a nullable type declaration, available since PHP 7.1:
{{{#!diff
- function test( string $test = null ) {}
+ function test( ?string $test = null ) {}
}}}

This commit updates the affected instances in core to use a nullable type declaration.

References:
* [https://wiki.php.net/rfc/deprecate-implicitly-nullable-types PHP RFC: Deprecate implicitly nullable parameter types]
* [https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated PHP.Watch: PHP 8.4: Implicitly nullable parameter declarations deprecated]

Follow-up to [28731], [50552], [57337], [57985].

Props ayeshrajans, jrf, audrasjb, jorbin.
Fixes #60786.
Built from https://develop.svn.wordpress.org/trunk@58009


git-svn-id: http://core.svn.wordpress.org/trunk@57480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-15 20:03:09 +00:00
Tammie Lister 593ccf4342 Twenty Eleven: Removes Negative values for padding.
This fixes the issue where negative values aren't allows in older versions of IE. There is more discussion in another ticket on a wider approach, but for now the decision to commit this was made as an interim solution.

Props mukesh27, SergeyBiryukov, sabernhardt, poena.
Fixes #46771.

Built from https://develop.svn.wordpress.org/trunk@58005


git-svn-id: http://core.svn.wordpress.org/trunk@57479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-15 16:40:12 +00:00
Tammie Lister 44528d4fba Twenty Twenty Two: Wraps Navigation block in row.
Now that the Blocks Hooks API is released in 6.4, you might want to insert blocks into header of the theme after the Navigation block. This wraps to allow this.

Props tomjcafferkey, poena, shailu25.
Fixes #60724.

Built from https://develop.svn.wordpress.org/trunk@58004


git-svn-id: http://core.svn.wordpress.org/trunk@57478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-15 16:26:15 +00:00
Sergey Biryukov 8689afae77 Twenty Twenty-One: Check for `WP_Error` before outputting `get_the_tag_list()`.
This prevents a fatal error on PHP 8 and brings consistency with the other bundled themes.

Follow-up to [47886].

Props josephscott, sabernhardt, poena, nirav7707, devsahadat.
Fixes #60800.
Built from https://develop.svn.wordpress.org/trunk@57991


git-svn-id: http://core.svn.wordpress.org/trunk@57477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-14 21:57:13 +00:00
Sergey Biryukov 7bb686d18b Users: Account for returning `false` from the `authenticate` filter.
While technically only `null`, `WP_User`, or `WP_Error` should be returned from the `authenticate` filter, a plugin might return boolean `false` instead, which would trigger the `authentication_failed` error prior to [57882].

This commit aims to preserve that behavior in case `false` is returned.

Follow-up to [57882].

Props johnbillion.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@57990


git-svn-id: http://core.svn.wordpress.org/trunk@57476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-13 16:33:13 +00:00
Tammie Lister 8d0570f72c Twenty Fourteen: Fixes pullquote block issues with font sizing.
The pullquote block was not showing increase in sizes within the editor. This solves that and allows you to see the change both in the editor and front.

Props nidhidhandhukiya, huzaifaalmesbah.
Fixes #59800.

Built from https://develop.svn.wordpress.org/trunk@57989


git-svn-id: http://core.svn.wordpress.org/trunk@57475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-12 19:55:12 +00:00
Pascal Birchler 09be520d72 Docs: Revert unintended `svn:ignore` change after [57987].
See #60699.
Built from https://develop.svn.wordpress.org/trunk@57988


git-svn-id: http://core.svn.wordpress.org/trunk@57474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-12 17:50:12 +00:00
Pascal Birchler 00d06db33d Docs: Fix various typos and spelling mistakes.
Props swissspidy, jucaduca, sergeybiryukov.
See #60699.
Built from https://develop.svn.wordpress.org/trunk@57987


git-svn-id: http://core.svn.wordpress.org/trunk@57473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-12 17:47:13 +00:00