Commit Graph

49815 Commits

Author SHA1 Message Date
Felix Arntz cd610922d0 Taxonomy: Ensure `get_edit_term_link()` produces the correct result when called without taxonomy.
This fixes an oversight missed in [36646].

Props debarghyabanerjee.
Fixes #61726.
See #35922.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 21:42:17 +00:00
dmsnell 539ee9221b HTML API: Add TABLE support in HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
support for various table-related insertion modes. This includes support
for tables, table rows, table cells, table column groups, etc...

Developed in https://github.com/wordpress/wordpress-develop/pull/6040
Discussed in https://core.trac.wordpress.org/ticket/61576

Props: dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 18:41:16 +00:00
hellofromTonya 7c1295fdb9 Customize: Sanitize autofocus URL parameter as an array.
[58069] introduced calling `sanitize_text_field()` with `$_REQUEST['autofocus']` (which is an array) and setting its default to a `string`. This fix restores the `array` data type for `autofocus`.

The fix also relocates the unsplash for `url`, `return`, and `autofocus` before sanitizing.

Follow-up to [58069], [34269], [29026], [21028].

Props jamesros161, swissspidy, dlh, audrasjb, hellofromTonya, ironprogrammer.
Fixes #61561.
Built from https://develop.svn.wordpress.org/trunk@58804


git-svn-id: http://core.svn.wordpress.org/trunk@58200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 16:23:17 +00:00
Sergey Biryukov 0702cafa87 Tests: Use more specific assertions in `get_comment_author()` tests.
Follow-up to [58335].

See #61530.
Built from https://develop.svn.wordpress.org/trunk@58803


git-svn-id: http://core.svn.wordpress.org/trunk@58199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 15:10:13 +00:00
Bernhard Reiter 8ab984897f block.json: Allow passing PHP filename as `variations` field.
Previously, the `variations` field in a block.json file could be used to provide a static list of the block's variations (i.e., an array). Alternatively, the block's `variation_callback` could be set during server-side block registration to point to a PHP function to generate those variations.

This changeset makes it so that the block.json `variations` field can be alternatively set to a string, which will be interpreted as the filename of a PHP file that generates the variations.

It is loosely modeled after [54132], which introduced the `render` field for `block.json`, as a way to point to a PHP file instead of providing a `render_callback`.

Props bernhard-reiter, gziolo.
Fixes #61280.
Built from https://develop.svn.wordpress.org/trunk@58801


git-svn-id: http://core.svn.wordpress.org/trunk@58197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 14:11:08 +00:00
desrosj 86754f2bc2 External Libraries: Update the `regenerator-runtime` library.
This updates the `regenerator-runtime` library to version `0.14.1`.

This library has not been used by Core itself in quite a while and only maintained as a courtesy. Any projects relying on `regenerator-runtime` should reevaluate their usage.

Props manooweb.
Fixes #60515.
Built from https://develop.svn.wordpress.org/trunk@58800


git-svn-id: http://core.svn.wordpress.org/trunk@58196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 14:07:17 +00:00
czapla 996817c3d9 Tests: Removes the obsolete Block Binding unregistration
Follow-up to [58798].
Props santosguillamot, cbravobernal, gziolo.
See #61641.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 11:31:18 +00:00
cbravobernal b104d200b6 Block Bindings: Adds sources in the editor settings to consume them in the client
Adds a new property `blockBindingsSources` to the editor settings to expose the block bindings sources registered in the server.

Props santosguillamot, cbravobernal, gziolo, artemiosans.
Fixes #61641.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 10:59:18 +00:00
noisysocks edb05c5809 Block themes: Enable block-level background image styles
Allows defining background images for blocks in theme.json.

Syncs PHP changes from https://github.com/WordPress/gutenberg/pull/60100.

Props ramonopoly, aaronrobertshaw.
Fixes #61588.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-24 00:26:14 +00:00
Tammie Lister afd60dd8a4 Twenty Twenty: Fixes Quote block border not reflecting alignment.
This resolves the border not also aligning with the quote block. When this theme was built the editor used style attributes for text alignment. This patch updates existing rules for center and right aligned quote blocks.

Props viralsampat, poena, sabernhardt.
Fixes #61132.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 21:52:15 +00:00
desrosj 584d36e618 Build/Test Tools: Update third-party GitHub Actions.
The following third-party actions have been updated to their latest versions.

- `shivammathur/setup-php` from `2.30.0` to `2.31.1`.
- `actions/setup-node` from `4.0.2` to `4.0.3`.
- `actions/cache` from `4.0.1` to `4.0.2`.
- `actions/upload-artifact` from `4.3.1` to `4.3.4`.
- `slackapi/slack-github-action` from `1.25.0` to `1.26.0`.
- `codecov/codecov-action` from `4.1.0` to `4.5.0`.

See #61564.
Built from https://develop.svn.wordpress.org/trunk@58789


git-svn-id: http://core.svn.wordpress.org/trunk@58191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 18:39:17 +00:00
Bernhard Reiter 4cecd0e731 Block Hooks: Don't erase post content if it isn't changed by client.
The `inject_ignored_hooked_blocks_metadata_attributes` filter that is attached to both the `rest_pre_insert_wp_template` and `rest_pre_insert_wp_template_part` hooks receives a `stdClass` object from the Templates REST API controller that contains all fields that the client would like to modify when making a `POST` request (plus the `id` to identify the relevant template or template part, respectively).

There are cases when the `post_content` field is not set, e.g. when the client would like to rename an existing template (in which case it would only set the `title` field).

Prior to this changeset, the filter would erroneously apply the Block Hooks algorithm to the non-existent `post_content` field regardless, which would result in it being set to the empty string `''`. As a consequence, renaming a template would have the unwanted side effect of wiping its contents.

This changeset fixes the issue by returning early from the filter if the `post_content` field is not set.

Props alshakero, bernhard-reiter.
Fixes #61550.
Built from https://develop.svn.wordpress.org/trunk@58785


git-svn-id: http://core.svn.wordpress.org/trunk@58187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 13:43:12 +00:00
Tammie Lister 7308b2518f Twenty Twenty: Fixes incorrect colour in editor for seperator block.
This resolves the seperator block color settings ordering. They were displaying incorrectly due to ruleset problems. This edits the order for the front end also.

Props bhaveshdesai13, aniketpatel, miguelaxcar, nidhidhandhukiya, poena, pavanpatil1, sabernhardr.
Fixes #57544.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 09:59:15 +00:00
youknowriad 21fb080d5c REST API: Remove post status prefix from REST API responses.
When using the /posts or /pages endpoints, for private posts or pages, you get the following title property: { raw: "Some title", rendered: "Private: Some title" }
this commit removes the prefix from rendered private posts titles (just like what we do for protected posts)

Props youknowriad, swissspidy, timothyblynjacobs, sergeybiryukov, ramonopoly.
Fixes #61639.
Built from https://develop.svn.wordpress.org/trunk@58783


git-svn-id: http://core.svn.wordpress.org/trunk@58185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 07:51:12 +00:00
Peter Wilson 2ecc281f69 Options, Meta APIs: Prime `notoptions` cache when deleting options.
Prime the `notoptions` cache within `delete_option` and `delete_network_option` to avoid the need for a database query if `get_option` or `get_network_option` is subsequently called.

Adds some associated tests to ensure that an option is cleared from the notoptions cache when an option is added either via `add_option`, `update_option` or their network option equivalent.

Props pbearne, mukesh27.
Fixes #61484.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-23 00:27:15 +00:00
dmsnell 8529edd888 HTML API: Fix unsupported insertion mode messages.
Insertion modes in an HTML parser may include instructions like "process
the token in the IN HEAD insertion mode." The rules do not change the
insertion mode of the parser, but the errors are triggered outside of the
rules for the current insertion mode. These will be misleading when
bailing on these instructions, because it will point someone to the wrong
place in the code to find the source of the error.

In this patch all of the bail-points due to lacking insertion mode support
are hard-coded to better orient someone to the section of the code lacking
support for handling the input HTML.

Developed in https://github.com/wordpress/wordpress-develop/pull/7043
Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58679].

Props: dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 23:21:14 +00:00
dmsnell 2d6e9a55cf HTML API: Remove empty test file after adding support for missing elements.
When support was added for the remaining tags in the IN BODY insertion mode, a test
file indicating that support was necessary for certain parts of the parser was
removed, but it wasn't removed from SVN when sending over the patch from `git`.

This patch removes that empty file so that the WPCS workflows pass.

Discussed in https://core.trac.wordpress.org/ticket/61576

Follow-up to [58779].

See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 22:51:13 +00:00
dmsnell 471b482bec HTML API: Add missing tags in IN BODY insertion mode to HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
support for the remaining missing tags in the IN BODY insertion mode. Not
all of the added tags are supported, because in some cases they reset the
insertion mode and are reprocessed where they will be rejected.

This patch also improves the support of `get_modifiable_text()`, removing
a leading newline inside a LISTING, PRE, or TEXTAREA element.

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

Props dmsnell, jonsurrell, westonruter.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 22:24:15 +00:00
Tammie Lister c4fbdf5eab Twenty Twenty: Fixes Customizer widget edit buttons being obstructed on smaller screens.
When the screen is smaller the edit buttons are obscured. This resolves that problem for the smaller screens and only targets the container for footer navigation and widgets.

Props sumitsingh, SergeyBiryukov, sabernhardt.
Fixes #49008.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 17:52:18 +00:00
Tammie Lister 62ea483f79 Twenty Sixteen: Fixes Quote block border width changes depending on font size.
When the font size is changed the border on the front was changing in width. This fix resolves that to make sure the width does not adjust.

Props nidhidhandhukiya, sabernhardt, kamran8176, pitamdey, shailu25.
Fixes #60239.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 16:30:16 +00:00
Tammie Lister 9b054b0ac6 Twenty Twelve: Fixes submenu hiding under slideshow block.
Whilst initially this could be thought to be solved in Jetpack due to submenus only having a z-index of 1 a fix is desirable. This brings in the suggested value.

Props robertghetau, SergeyBiryukov, sabernhardt, poena, narenin.
Fixes #55892.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 15:36:14 +00:00
youknowriad 97eacaa791 Build Tools: Use umd builds provided by React instead of bundling our own builds.
We tried moving away from the deprecated React UMD builds previously,
the problem we faced is that there's a warning that is triggered on the console because we're not using a separate impact for `createRoot`.

This warning has been removed in React 19 along with the removal of the UMD builds, so we should be able to revert this commit when we upgrade to React 19 but for now, we need to restore the usage of the umd builds.

Props mamaduka.
See #61324.
Built from https://develop.svn.wordpress.org/trunk@58775


git-svn-id: http://core.svn.wordpress.org/trunk@58177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-22 10:02:15 +00:00
Sergey Biryukov aeb2fc3083 I18N: Correctly output the `None` translatable strings.
Includes updating the context to match the pre-existing block editor translations.

Follow-up to [58284].

Props sabernhardt, Marius84.
Fixes #61714.
Built from https://develop.svn.wordpress.org/trunk@58774


git-svn-id: http://core.svn.wordpress.org/trunk@58176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-21 18:58:16 +00:00
Sergey Biryukov 45b948b0e4 Media: Check if content URL includes a hostname in `wp_calculate_image_srcset()`.
This resolves an `Undefined array key "host"` PHP warning if `WP_CONTENT_URL` is set to a relative URL.

Follow-up to [58097].

Props mattraines, narenin, pamprn, SergeyBiryukov.
Fixes #61690.
Built from https://develop.svn.wordpress.org/trunk@58773


git-svn-id: http://core.svn.wordpress.org/trunk@58175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-20 13:32:15 +00:00
Tammie Lister 9abf0d77e7 Twenty Fifteen: Fixes List Block with padding not having background color.
The List Block when had padding was not displaying the background color correctly. This only impacts the non-framed editor.

Props viralsampat, devtanbir, sabernhardt, deepakvijayan.
Fixes #60197.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-20 12:43:17 +00:00
Tammie Lister a75e8ef744 Multiple themes Fixes theme screen reader including text inside card.
The function twentysixteen_entry_meta included screen reader text inside the span property using the author mf class. This resolves that in both Twenty Sixteen and Twenty Fifteen. It should have the screen reader text inside the byline span but outside the author vcard span.

Props dshanske, laurelfulford, sabernhardt, shilu25.
Fixes #46233.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-20 10:57:14 +00:00
Tammie Lister d5f4f876fb Twenty Twenty-Four: Fixes typos in pattern descriptions.
There were a number of typos in the patterns. These came in [58111] with some additions having issues and so this resolves that.

Props tobifjellner, sabernhardt, audrasjb.
Fixes #61682.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-20 10:08:14 +00:00
dmsnell 51afccc65f HTML API: Add PHP type annotations.
This patch adds type annotations to internal and private methods of the HTML
API and the supporting WP_Token_Map. Annotations have not been added to the
public interfaces where it would likely crash a site if called wrong.

These annotations should help avoid unnecessary type-related bugs (as have
been uncovered in earlier work adding such annotations) and provide additional
guidance to developers when interacting with these classes in an IDE.

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

Props dmsnell, jonsurrell.
See #61399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-19 23:44:16 +00:00
Sergey Biryukov 2b2781cb0f Docs: Correct `@return` value for `_get_block_templates_files()`.
The function returns `null` if `$template_type` is not `wp_template` or `wp_template_part`.

Follow-up to [52062].

Props dilipbheda, mukesh27.
Fixes #61705.
Built from https://develop.svn.wordpress.org/trunk@58768


git-svn-id: http://core.svn.wordpress.org/trunk@58170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-19 15:56:16 +00:00
desrosj cdf6e7c128 Build/Test Tools: Ensure `TARGET_SHA` is set for older branches.
The `workflow_dispatch` event payload does not contain the `before` property containing the previous commit’s SHA value, which causes scheduled runs of the performance testing workflow in older branches to fail.

This adds a step specifically for this event type to use native Git commands to retrieve the required SHA value instead.

Props joemcgill.
Fixes #61699.
Built from https://develop.svn.wordpress.org/trunk@58767


git-svn-id: http://core.svn.wordpress.org/trunk@58169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-19 13:15:15 +00:00
Aaron Jorbin 23b0fdc142 General: Provide _is_utf8_charset() in compat.php for early use
#61182 introduced is_utf8_charset() as a way of standardizing checks for charset slugs referring to UTF-8. This is called by _mb_strlen() inside of compat.php, but is_utf8_charset() is defined in functions.php, which isn't loaded early on. Code calling mb_strlen() early on before functions.php loads in hosts without the multibyte extension therefore may crash.

Props dmsnell, jonsurrell, joemcgill, jorbin.
Fixes #61681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 18:04:11 +00:00
hellofromTonya 5f637ea437 Editor: Update packages for 6.6.1.
Bugfixes included:

* [https://github.com/WordPress/gutenberg/pull/63637 Elements: Avoid specificity bump for top-level element-only selectors].
* [https://github.com/WordPress/gutenberg/pull/63406 Navigation block: Allow themes to override block library text-decoration rule].
* [https://github.com/WordPress/gutenberg/pull/63436 Fix invalid css for nested fullwidth layouts with zero padding applied].
* [https://github.com/WordPress/gutenberg/pull/63397 Prevent empty void at the bottom of editor when block directory results are present].
* [https://github.com/WordPress/gutenberg/pull/63291 Pattern overrides: Ensure "Reset" button always shows as last item and with border].
* [https://github.com/WordPress/gutenberg/pull/63562 Global Styles: Disable "Reset styles" button when there are no changes].
* [https://github.com/WordPress/gutenberg/pull/63093 Fix: Removed shuffle button when only 1 pattern is present].
* [https://github.com/WordPress/gutenberg/pull/62675 fix: wp icon focus issue].
* [https://github.com/WordPress/gutenberg/pull/63565 useBlockElement: return null until ref callback has time to clean up the old element].

Props ellatrix.
Fixes #61692.
See #61660, #61630, #61656.
Built from https://develop.svn.wordpress.org/trunk@58757


git-svn-id: http://core.svn.wordpress.org/trunk@58159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 16:03:23 +00:00
hellofromTonya bbfa972fe0 Coding Standards: Capitalize inline comment in get_comment_author() test dataset.
Per coding standards, capitalizes the first character of the inline comment in the test dataset.

Follow-up to [58755].

Props SergeyBiryukov.
See #61681.
Built from https://develop.svn.wordpress.org/trunk@58756


git-svn-id: http://core.svn.wordpress.org/trunk@58158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 15:19:15 +00:00
hellofromTonya 0a40c7728d Comments: Fix fatal error when get_comment_author() receives an object with no comment_id.
[58335] introduced `(string)` type casting of the passed in `$comment_id` value. If `$comment_id` is a scalar, it works as expected. But if it's an `object`, the following fatal error is thrown:

{{{
Object of class WP_Comment could not be converted to string
}}}

This fatal error happens when the incoming `$comment_id` is an instance of `WP_Comment` (or any object) without a `comment_ID` (empty). 

This changeset adds tests to demonstrate the fatal error and validate the fix.

It fixes the fatal error by restructuring the ternary checks into an `if/elseif/else` structure for the 3 paths:

- When `$comment->comment_ID` is not empty, then it uses the property.
- When `$comment_id` is scalar, then it type casts it to a `string`.
- Else, the default is an empty `string`.

Follow-up to [58335], [41127], [52818].

Props ambrosiawt, hellofromTonya, jorbin, mukesh27, SergeyBiryukov.
Fixes #61681.
Built from https://develop.svn.wordpress.org/trunk@58755


git-svn-id: http://core.svn.wordpress.org/trunk@58157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 15:09:15 +00:00
desrosj afc22cfd4a Build/Test Tools: Remove regular 6.2 & 6.3 branch performance testing.
Prior to WordPress 6.4, performance testing was performed using Puppeteer instead of Playwright (converted in [56926]). Because of the flaky nature of the workflow using Puppeteer, it was not converted to the reusable pattern implemented through #61213. It was instead removed from 6.2 and 6.3 in [58301] and [58330], respectively.

This removes the workflow for these branches from the strategy matrix when testing old branches to avoid errors and adds an expanded note about why those branches are missing.

See #61213, #61564.
Built from https://develop.svn.wordpress.org/trunk@58754


git-svn-id: http://core.svn.wordpress.org/trunk@58156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 14:11:14 +00:00
Sergey Biryukov 3870065e31 Upgrade/Install: Add missing files from the sodium_compat v1.21.1 update.
Follow-up to [58752].

Props paulkevan.
See #61686.
Built from https://develop.svn.wordpress.org/trunk@58753


git-svn-id: http://core.svn.wordpress.org/trunk@58155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 13:48:15 +00:00
Sergey Biryukov f0b4b44d1e Upgrade/Install: Update sodium_compat to v1.21.1.
The latest version of sodium_compat includes support for AEGIS and preliminary support for PHP 8.4.

Additionally, the PHP 8.2+ `SensitiveParameter` attribute is now applied where appropriate to functions in the public API. This attribute is used to mark parameters that are sensitive and should be redacted from stack traces.

References:
* [https://github.com/paragonie/sodium_compat/releases/tag/v1.21.0 sodium_compat 1.21.0 release notes]
* [https://github.com/paragonie/sodium_compat/releases/tag/v1.21.1 sodium_compat 1.21.1 release notes]
* [https://github.com/paragonie/sodium_compat/compare/v1.20.0...v1.21.1 Full list of changes in sodium_compat 1.21.1]

Follow-up to [49741], [51002], [51591], [52988], [54150], [54310], [55699].

Props jrf, dd32, paragoninitiativeenterprises.
Fixes #61686.
Built from https://develop.svn.wordpress.org/trunk@58752


git-svn-id: http://core.svn.wordpress.org/trunk@58154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 13:00:16 +00:00
noisysocks ab39abeed7 Block Themes: Fix invalid css for nested fullwidth layouts with zero padding applied
In the Layout block support, handle 0 values for padding as 0px in calc()
rules. This resolves a bug for nested fullwidth layouts when zero padding is
applied. Due to how calc() works, without supplying the unit, the rule will not
work, resulting in a horizontal scrollbar.

Backports the PHP changes in https://github.com/WordPress/gutenberg/pull/63436.

Fixes #61656.
Props andrewserong, mukesh27, aaronrobertshaw.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58152 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 06:50:10 +00:00
noisysocks a4e3fdfa3a Block Themes: Avoid specificity bump for top-level element-only selectors
Prevent issues (e.g. links being underlined) caused by a bump in CSS
specificity for top-level element-only global element styles.

Backports the PHP changes from https://github.com/WordPress/gutenberg/pull/63403.

Fixes #61630.
Fixes #61660.
Props aaronrobertshaw, andrewserong, noisysocks.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 06:43:18 +00:00
joedolson 05c7351e53 Toolbar: Move user and recovery menus to a higher priority.
Following [58215], admin bar items in the `top-secondary` group have a changed visual order. Increase the priority of the user and recovery menu items so nodes added with higher priorities will still be shown visually before the user and recovery menu items, as they were prior to 58215.

The items will appear in the reverse of the previous order, but the new order now matches their priority order, rather than being the opposite.

Props sabernhardt, joemcgill, pbiron, joedolson.
Fixes #61615.
Built from https://develop.svn.wordpress.org/trunk@58748


git-svn-id: http://core.svn.wordpress.org/trunk@58150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-18 00:52:17 +00:00
joedolson 46485f9db4 Editor: Limit scope of resizable menu container CSS.
The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.

Props neotrope, sabernhardt, joedolson.
Fixes #61662.
Built from https://develop.svn.wordpress.org/trunk@58747


git-svn-id: http://core.svn.wordpress.org/trunk@58149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 23:37:16 +00:00
Sergey Biryukov 51d8a8ea62 Docs: Add missing description for the `display_rows()` method in list table classes.
Follow-up to [15491], [17002], [27301].

Props nikitasolanki1812, narenin, mukesh27, dd32, SergeyBiryukov.
Fixes #61670.
Built from https://develop.svn.wordpress.org/trunk@58745


git-svn-id: http://core.svn.wordpress.org/trunk@58147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 15:43:15 +00:00
davidbaumwald 4538fa7498 Upgrade/Install: Update the `$_old_files` array for 6.6.
Props dd32, audrasjb, hellofromTonya.
Fixes #61665.
Built from https://develop.svn.wordpress.org/trunk@58744


git-svn-id: http://core.svn.wordpress.org/trunk@58146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 13:35:15 +00:00
Sergey Biryukov 04358f497d Docs: Fix typo in a comment in `wp.media.view.Attachment.Details.TwoColumn`.
Follow-up to [41351].

Props devansh2002, mukesh27.
Fixes #61658.
Built from https://develop.svn.wordpress.org/trunk@58743


git-svn-id: http://core.svn.wordpress.org/trunk@58145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 11:28:16 +00:00
dmsnell b7b504dc0d Fix phpdoc nullable types in some files.
It was found that in several places in the HTML API and its supporting files,
the wrong form of type annotation was used for optional parameters.

Instead of using `?type`, this patch uses `type|type-of-default-value` instead,
noting where important if the parameter is optional, and if so, what its default
value is.

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

Props dmsnell, jonsurrell.
See #61399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:53:17 +00:00
dmsnell c0f074c7ce HTML API: Test code improvements in virtual node breadcrumb tests.
Follow-up after feedback to newly-introduced tests,
mostly to enhance the message when the tests fail.

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

Follow-up to [58592].

Props dmsnell, jonsurrell.
See #61646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:35:14 +00:00
dmsnell 81fc8b3ddc HTML API: Remove leading whitespace after removing class names.
In part of a larger review of CSS semantics and behaviors, this patch
takes the opportunity to remove leading whitespace in an updated class
attribute after the first class in the attribute has been removed.

Previously, if the first class name had been removed, the whitespace
that formerly followed it would remain in the class attribute. This
stood in contrast to removing other class names, which removed their
associated whitespace.

There should be no semantic or functional changes in this patch, only
a slightly-large diff for modified HTML documents that looks prettier
when removing the first class name in a class attribute.

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

Props dmsnell, jonsurrell.
See #61531.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-17 00:12:18 +00:00
hellofromTonya 4007d27204 Tests: Use data provider in Tests_Interactivity_API_wpInteractivityAPIFunctions.
Refactors the following tests to use a data provider with named test cases:
* `test_wp_interactivity_data_wp_context_with_different_arrays()`
* `test_wp_interactivity_data_wp_context_with_different_arrays_and_a_namespace()`
* `test_wp_interactivity_data_wp_context_with_json_flags()`

This is better as:
1. One failing test will not block the other tests from running.
2. Each test is now referenced by name in any error message, making it more straight forward to see which test failed.
3. The test no longer contains multiple assertions.
3. It makes it more straight forward to add additional tests.

Follow-up to [58594], [58234], [57762], [57743], [57742], [57563].

Props jrf.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58739


git-svn-id: http://core.svn.wordpress.org/trunk@58141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 18:39:12 +00:00
hellofromTonya 4c2edeb04a Tests: Don't declare nested named function in Tests_Interactivity_API_wpInteractivityAPIFunctions.
Once the `test_process_directives_when_block_is_filtered()` method has run, the named `test_render_block_data()` function declared nested within becomes part of the global namespace, which could cause problems for other tests.

Quite apart from the fact that the name starting with `test_`  is confusing (as methods prefixed with `test_` are supposed to be test methods to be run by PHPUnit).

Using a closure for this callback fixes the issue. Declared as `static` for a micro-optimization.

Follow-up to [57826].

Props jrf, hellofromTonya.
See #61530.
Built from https://develop.svn.wordpress.org/trunk@58738


git-svn-id: http://core.svn.wordpress.org/trunk@58140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 18:22:18 +00:00
dmsnell db0e0abe14 HTML API: Add tests confirming comment behavior in HTML Processor.
There was a bug-fix late in the 6.6 cycle in the HTML Processor which
resolved an issue with the wrong name being reported when paused at
processing-instruction look-alike invalid comments, but no tests were
added to enforce the correct behaviors.

This patch adds the missing tests.

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

Follow-up to [58304], [58558].

Props dmsnell, jonsurrell.
See #61530.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-16 16:02:11 +00:00