Commit Graph

49727 Commits

Author SHA1 Message Date
Sergey Biryukov 11fb201256 Code Modernization: Remove obsolete comments about older PHP versions.
This commit:
* Removes various comments referencing PHP versions which are no longer supported.
* Removes various comments containing “hints” of things to do after a particular PHP version drop. These hints are incorrect/not actionable for various reasons, so have no value:
 * Even though a function could be turned into a closure, removing the function would be a backward compatibility break which is not acceptable, so this suggestion is not actionable.
 * Short ternaries are forbidden by the coding standard exactly to prevent the faulty code suggested in the comment from getting into the codebase.

Follow-up to [1243/tests], [6543], [11816], [29861], [29864], [34928], [35369], [36698], [38694], [50786], [58678].

Props jrf, ayeshrajans.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58682


git-svn-id: http://core.svn.wordpress.org/trunk@58084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 14:54:16 +00:00
dmsnell bccb3e46e1 HTML API: Respect `tag_name` query arg in `HTML_Processor::next_tag()`
Previously the HTML Processor was ignoring the `tag_name` argument in
the `next_tag()` query if it existed. This was wrong adn would lead to
calling code finding the very next tag, regardless of tag name, instead
of the requested taag.

This patch adds the tag name detection code into `next_tag()` to fix
the bug and ensure that `next_tag()` always returns only when finding
a tag of the given name.

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

Follow-up to [56274].

Fixes #61581.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-06 10:20:15 +00:00
dmsnell 2bcd388bf9 HTML API: Fix wrong @since tag.
When the remaining insertion modes were stubbed in the HTML Processor,
a `@since` tag was mistakenly copied with 6.4.0 instead of 6.7.0.

This patch fixes the invalid tag.

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

Follow-up to [58679].

Props tobiasbg.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 22:23:14 +00:00
dmsnell e1c3eab4ce HTML API: Stub out remaining insertion modes in the HTML Processor.
As part of work to add more spec support to the HTML API, this patch adds
stubs for all of the remaining parser insertion modes in the HTML Processor.
These modes are not all supported yet, but they will be necessary to continue
adding support for other tags and markup.

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

Props dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 16:39:17 +00:00
Sergey Biryukov 6ff382af63 Code Modernization: Remove obsolete code targeting PHP < 7.2.24.
Follow-up to [44488], [45262], [53426], [57985].

Props ayeshrajans, jrf.
See #61574.
Built from https://develop.svn.wordpress.org/trunk@58678


git-svn-id: http://core.svn.wordpress.org/trunk@58080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 10:12:16 +00:00
dmsnell 411205cf87 HTML API: Support SELECT insertion mode.
As part of work to add more spec support to the HTML API, this patch adds
support for the SELECT, OPTION, and OPTGROUP elements, including the
requisite support for the IN SELECT insertion mode.

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

Props dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-05 00:52:18 +00:00
dmsnell bb1da1f82e HTML API: Add `current_node_is()` helper method to stack of open elements.
As part of work to add more spec support to the HTML API, this new method
will make it easier to implement the logic when in the SELECT and TABLE
insertion modes.

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

Props dmsnell, jonsurrell.
See #61576.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 23:16:16 +00:00
dmsnell 8269c3fcd6 Users: Avoid ambiguous password reset URLs for usernames ending in a period.
When WordPress sends out a password-reset or new-user email, it generates
a link for someone to follow in order to take them to the reset page. If
the user login name ends in a period, however, that generated URL will
end in a period and many email clients will confuse it with a
sentence-ending period instead of being part of the query arguments.

In this patch, the generated URL's query argument are rearranged so that
the link will never end in a period. Alternative ideas were explored to
create a new function to escape URL-ending periods, but this patch resolves
the reported problem without raising any further architectural questions.

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

Props audrasjb, costdev, daveagp, dmsnell, hellofromTonya, markparnell, mukesh27, nhrrob, obrienlabs, paulcline.
Fixes #42957.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 22:01:22 +00:00
Sergey Biryukov 99c9e42672 Tests: Use `assertSame()` in `WP_REST_Global_Styles_Revisions_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 [56082].

See #61573.
Built from https://develop.svn.wordpress.org/trunk@58673


git-svn-id: http://core.svn.wordpress.org/trunk@58075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 15:11:20 +00:00
desrosj 2d64abf8a7 Docs: Update AJAX in Plugins HelpHub link to avoid unnecessary redirection.
Follow-up to [17045], [20713], [41065], [45674], [55412], [57854], [58131], [58132].

Props shailu25.
See #60732, #60699.
Built from https://develop.svn.wordpress.org/trunk@58672


git-svn-id: http://core.svn.wordpress.org/trunk@58074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 11:22:13 +00:00
Peter Wilson 876374d3e9 Help/About: Update performance improvements string.
Updates the performance improvements string with the finalized percentage improvement in the editor and to improve styling and language consistency.

Props ryelle, annezazu, peterwilsoncc.
Fixes #61320.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-04 04:20:19 +00:00
dmsnell eda0d41f46 HTML API: Implement the _reset insertion mode appropriately_ algorithm.
In order to add support for the SELECT and TABLE tags in the HTML Processor, it
needs to implement the HTML algorithm named "reset the insertion mode
appropriately".

This patch implements that algorithm to unblock the additional tag support. The
algorithm resets the parsing mode after specific state changes in complicated
situations where alternative rules are in effect (such as rules governing how
the parser handles tags found within a TABLE element).

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

Props dmsnell, jonsurrell.
Fixes #61549.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 17:07:15 +00:00
desrosj 5569a5cf93 Build/Test Tools: Fix workflow names in test old branches workflow.
After the changes in [58165] and [58645] and all associated backports, the workflow that dispatches regular testing in older branches needed to be updated.
- The `test-npm.yml` workflow no longer exists.
- The `test-build-processes.yml` has taken the place of `test-npm.yml` in all branches.

Also, the workflow will now run whenever an old version of the reusable PHPUnit workflow is updated (v1 or v2). This is to ensure the changes don’t cause any compatibility problems in older branches.

See #61213.
Built from https://develop.svn.wordpress.org/trunk@58654


git-svn-id: http://core.svn.wordpress.org/trunk@58069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 16:30:20 +00:00
Sergey Biryukov ed0762ad01 Users: Pass the previous state of the user as context to the `wp_set_password` hook.
Follow-up to [55056], [55250].

Props dd32.
Fixes #61541.
Built from https://develop.svn.wordpress.org/trunk@58653


git-svn-id: http://core.svn.wordpress.org/trunk@58068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 16:10:16 +00:00
desrosj f59d23e7f1 Build/Test Tools: Rename current reusable PHPUnit workflow.
This adds a ` -v3` suffix to the current reusable PHPUnit workflow name. This avoids having to update older branches in the future when the workflow’s logic drastically changes and a `v4` is needed.

See #61213.
Built from https://develop.svn.wordpress.org/trunk@58645


git-svn-id: http://core.svn.wordpress.org/trunk@58065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 15:53:14 +00:00
Tammie Lister e7370bd83b Twenty Sixteen: Fixes editor styles for table and calendar blocks and captions.
The table and calendar block font sizes were not as expected on front end within editor. This includes changes for header cells (th), removes redundant font size rules, corrects font-weight and updates figcaption selector along with editing text alignment and adding RTL font selection.

Props nidhidhandhukiya, sabernhardt, sheulyshila, iamfarhan09, bijit027, jannathsyeda, pooja1210, shailu25, hmbashar.
Fixes #58355.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 11:04:12 +00:00
Tammie Lister 4d6f01b32d Twenty Seventeen and Twenty Ten: Fixes gallery captions being at the bottom of images.
The margin specified in this theme caused issues when the gallery was placed in another block. This fix covers both themes as the selector is used within both.

Props pevogam, sabernhardt.
Fixes #58362.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 10:47:16 +00:00
Tammie Lister f54e344ed8 Twenty Ten: Fixes table and calendar block font size issues.
The table and calendar block font sizes were not the same on front and in editor. This resolves in using relative line-height.

Props iamfarhan09, bijit027, sabernhardt.
Fixes #58362.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-03 10:29:16 +00:00
noisysocks 27d7112e88 Themes: add "description" key to i18n schema
Add "description" key to the theme.json i18n schema.

Follows r56041.
Fixes #61543.
Props ramonopoly, oandregal.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 23:25:18 +00:00
dmsnell 66e0296b73 HTML API: Add missing insertion mode constants.
As the HTML Processor starts to support other insertion modes outside of
"IN BODY" it needs to be aware of those other modes. This patch
introduces the missing insertion modes in preparation for adding that
support.

Extracted as necessary prep work to the following more complete change:
https://github.com/WordPress/wordpress-develop/pull/6020

Props jonsurrell.
See #61549.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 21:47:15 +00:00
Tammie Lister 216010de95 Twenty Nineteen: Fixes font size and citation display for Pullquote block.
The pullquote block text decoration was not the same front and within the editor. This resolves that and resets.

Props pitamdey, viralsampat, sabernhardt.
Fixes #61507.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 20:48:15 +00:00
Tammie Lister 98148173c6 Twenty Twenty-One: Resolves bug on primary navigation.
The primary navigation was stuck in a vertical list when resize. This resolves that with positioning.

Props nek285, mukesh27.
Fixes #52663.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 20:36:17 +00:00
Tammie Lister 8d260fe6ed Twenty Nineteen: Adds center alignment to Archives and Categories List blocks.
When selecting center alignment for Archives or Categories List blocks the alignment was not matching. It is worth noting this fixes for these blocks but another ticket could be made to fix for titles.

Props pranitdugad, sabernhardt.
Fixes #47044.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 20:01:16 +00:00
Sergey Biryukov 144cc650b9 Login and Registration: Remove redundant escaping in `wp-login.php`.
* `$user_login` in the `login` action is already escaped on output.
* `$user_login` and `$user_email` in the `register` action are already unslashed a few lines above.

Follow-up to [3120], [4339], [8454], [11104], [23416], [23554], [23594], [46640].

Props johnjamesjacoby, rajinsharwar, narenin.
Fixes #55335.
Built from https://develop.svn.wordpress.org/trunk@58623


git-svn-id: http://core.svn.wordpress.org/trunk@58056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 17:46:15 +00:00
ryelle b048f2a054 Help/About: Add images to the About page.
The images have been uploaded to the w.org CDN and added into the About page. Additionally, the link to the release page has been fixed, and an extra translator note about the escaped percent sign has been added.

Follow-up to [58568].

Props ryelle, joen.
See #61320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 15:15:18 +00:00
ellatrix 3c53d98912 Editor: Update packages for 6.6 RC 2.
Fixes #61548.
Fixes https://github.com/WordPress/wordpress-develop/pull/6953.

See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.

Props ellatrix, youknowriad.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 14:53:30 +00:00
costdev bc86b48d56 Plugins: Remove extra paragraph from plugin row dependency notice.
In `WP_Plugins_List_Table::add_dependencies_to_dependent_plugin_row()`, a `sprintf()` call previously wrapped the `%2$s` placeholder in paragraph tags.

[57769] changed the placeholder's value to use `wp_get_admin_notice()`, which returns a paragraph-wrapped notice by default. As a result, the previous paragraph tags produced an extra, empty paragraph.

This removes the paragraph tags around the `%2$s` placeholder.

Follow-up to [57545], [57714], [57769].

Props mukesh27.
Fixes #61546.
Built from https://develop.svn.wordpress.org/trunk@58616


git-svn-id: http://core.svn.wordpress.org/trunk@58049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 11:52:23 +00:00
Bernhard Reiter 31e6e2ce05 Block Hooks: Fix a number of multi-line comment openers.
Add the missing second asterisk to a number of multi-line comment openers, and remove a superfluous second asterisk from two others.

Follow-up to [58614].
Props mukesh27.
See #60854.
Built from https://develop.svn.wordpress.org/trunk@58615


git-svn-id: http://core.svn.wordpress.org/trunk@58048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 10:43:16 +00:00
Bernhard Reiter 73b9a4956f Block Hooks: Allow child insertion into Template Part block.
The Block Hooks mechanism was previously extended to allow insertion of a block as a Navigation block's first or last child. This was implemented by storing the `ignoredHookedBlocks` array in the corresponding `wp_navigation` post's post meta (instead of a metadata attribute on the anchor block).

This changeset extends that mechanism to Template Part blocks, by storing said metadata in the corresponding `wp_template_part` post's post meta, thus allowing extenders to use Block Hooks to insert a block as a Template Part block's first or last child, respectively.

Props tomjcafferkey, bernhard-reiter.
Fixes #60854.
Built from https://develop.svn.wordpress.org/trunk@58614


git-svn-id: http://core.svn.wordpress.org/trunk@58047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-02 10:03:15 +00:00
dmsnell df598e1d98 HTML API: Optimize low-level parsing details in Tag Processor.
Introduces a number of micro-level optimizations in the Tag Processor to
improve token-scanning performance. Should contain no functional changes.

Based on benchmarking against a list of the 100 most-visited websites,
these changes result in an average improvement in performance of the Tag
Processor for scanning tags from between 3.5% and 7.5%.

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

Follow-up to [55203].

See #61545.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-01 23:36:15 +00:00
Sergey Biryukov 8a4deae8f8 REST API: Correct image cropping tools in the block editor.
As of [58457], the width and height cropping values are cast to an integer before the comparison to see if the target width and height differ from the original width and height.

Since they are now integers, it exposes a bug where the `&&` of the `if` conditional meant that if you were only cropping in one dimension, the check wouldn't pass, and cropping would not occur.

In the block editor, the cropping tools are aspect ratio based, so one of the dimensions will always match that of the source image. Therefore, now that the values are cast as integers, the condition that allows a cropping to occur needs to be updated. If either width or height is different from the source image, then a crop should be allowed.

Follow-up to [50124], [58457].

Props andrewserong, jrf, kevin940726.
Fixes #61514. See #59782.
Built from https://develop.svn.wordpress.org/trunk@58612


git-svn-id: http://core.svn.wordpress.org/trunk@58045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-07-01 20:45:15 +00:00
Sergey Biryukov 4efbbb3415 Date/Time: Correct singular form for minutes in `human_time_diff()`.
Follow-up to [58600].

Props wildworks.
See #61535.
Built from https://develop.svn.wordpress.org/trunk@58601


git-svn-id: http://core.svn.wordpress.org/trunk@58044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-30 14:58:22 +00:00
Sergey Biryukov 5f22738264 Date/Time: Replace abbreviations for minutes in `human_time_diff()`.
This ensures that relative times are formatted the same way in both JS and PHP.

Follow-up to [1976], [2124], [4658], [41018], [56496].

Props wildworks.
Fixes #61535.
Built from https://develop.svn.wordpress.org/trunk@58600


git-svn-id: http://core.svn.wordpress.org/trunk@58043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-29 09:31:22 +00:00
desrosj 2548045917 Build/Test Tools: Allow older branches to use Coding Standards workflow.
This updates the reusable coding standards GitHub Actions workflow to support the old way of running PHPCS commands when the `old-branches` input flag is set to `true`. This allows the 5.1-5.4 branches to use the same workflow as all other 5.5+ branches.

See #61213.
Built from https://develop.svn.wordpress.org/trunk@58596


git-svn-id: http://core.svn.wordpress.org/trunk@58042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-28 18:21:11 +00:00
desrosj 211388b4b0 Build/Test Tools: Introduce two additional reusable PHPUnit workflows.
The changes associated with #61213 aim to update all branches potentially receiving security updates to use the same workflow files for easier maintenance as much as possible. However, there are times when the logic found in GitHub Action workflow files changes pretty drastically.

For PHPUnit testing, there are 2 instances where this occurred: the 5.2 and 5.9 branches. This changeset introduces 2 new reusable PHPUnit workflow files for use the 4.1-5.1 and 5.2-5.9 branches.

Including these workflows in `trunk` makes it more clear which version of the workflow file is used by these old branches, and allows Dependabot to open PRs for updating 3rd-party actions within these workflows.

Props jorbin.
See #61213.
Built from https://develop.svn.wordpress.org/trunk@58595


git-svn-id: http://core.svn.wordpress.org/trunk@58041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-28 18:18:17 +00:00
Sergey Biryukov f7f1739090 Tests: Use `assertSame()` in `WP_Interactivity_API` 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 [57563], [57649], [57822], [57826], [57835], [58159], [58327].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-28 15:47:24 +00:00
gziolo 8545466f24 HTML API: Add tests for virtual node breadcrumbs and depth
Follow-up [58590].
See #61348.
Props jonsurrell, gziolo.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-28 09:22:17 +00:00
Pascal Birchler 98c48e4365 Docs: Fix docblock alignment for `pre_get_language_files_from_path` filter.
Props khokansardar.
Fixes #61416.
Built from https://develop.svn.wordpress.org/trunk@58591


git-svn-id: http://core.svn.wordpress.org/trunk@58038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-28 08:51:16 +00:00
Sergey Biryukov a47ccea2da Docs: Add missing full stop in some DocBlocks in `wp-includes/user.php`.
Follow-up to [40980], [43211], [43373], [47279], [51129].

Props praful2111, nareshbheda.
Fixes #61491.
Built from https://develop.svn.wordpress.org/trunk@58589


git-svn-id: http://core.svn.wordpress.org/trunk@58036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-27 23:17:17 +00:00
dmsnell ede77aca35 HTML API: Report breadcrumbs properly when visiting virtual nodes.
When [58304] introduced the abililty to visit virtual nodes in the HTML document,
those being the nodes which are implied by the HTML but no explicitly present in
the raw text, a bug was introduced in the `get_breadcrumbs()` method because it
wasn't updated to be aware of the virtual nodes. Therefore it would report the
wrong breadcrumbs for virtual nodes. Since the new `get_depth()` method is based
on the same logic it was also broken for virtual nodes.

In this patch, the breadcrumbs have been updated to account for the virtual nodes
and the depth method has been updated to rely on the fixed breadcrumb logic.

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

Follow-up to [58304].

Props dmsnell, jonsurrell, zieladam.
See #61348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-27 20:49:19 +00:00
desrosj c1d1be9745 Build/Test Tools: Revert `uglify-js` update.
This partially reverts [58563], which applied an update of the `uglify-js` `devDependency` from `3.17.4` to `3.18.0`.

The `3.18.0` update is causing some JavaScript errors in the `media-views.min.js` file, so needs to be investigated further.

Props david.binda, mukesh27, alshakero.
Fies #61519.
Built from https://develop.svn.wordpress.org/trunk@58585


git-svn-id: http://core.svn.wordpress.org/trunk@58032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-27 12:55:22 +00:00
Tammie Lister da76e67830 Twenty Seventeen: Fixes button block font weight not changing.
The button block appearance was not changing when using settings. This resolves that using inherit.

Props pranitdugad, sabernhardt, shailu25, hmbashar.
Fixes #60937.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 21:07:22 +00:00
Tammie Lister 8b20dd4294 Twenty Twenty-One: Resolves wrong drop cap alignment in RTL.
Drop cap was not aligning correct for RTL. This removes the float property.

Props rafaelgalani, peterwilsoncc, ryancurban, sabernhardt.
Fixes #52885.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 19:58:15 +00:00
Tammie Lister 43126fa789 Twenty Nineteen: Fixes messy navigation with RTL language.
The first tag wasn't switching correctly. This resolves it for an adjacent RTL language link setting list items to inline-block.

Props manooweb, audrasjb, SergeyBiryukov, davidbaumwald, marybaum, sabernhardt.
Fixes #46658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 19:13:15 +00:00
Sergey Biryukov c15614f3cb Users: Restore spacing between the messages on Edit User screen.
Includes restoring paragraph tags for “User updated” and “← Go to Users” messages, so that the arrow is not on the same line as the previous message.

Follow-up to [56570].

Props Presskopp, narenin, swissspidy, SergeyBiryukov.
Fixes #61506.
Built from https://develop.svn.wordpress.org/trunk@58581


git-svn-id: http://core.svn.wordpress.org/trunk@58028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 15:23:14 +00:00
Tammie Lister 13d010f2d6 Twenty Nineteen: Fixes avatar block size inconsistency.
The avatar block size was different between front and editor. This was because the width and height were added to the avatar class. 

Props poena, naeemhaque, sabernhardt, sakibmd.
Fixes #60664.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 13:48:13 +00:00
Bernhard Reiter 3c520f16dd Script Modules: Add new API to embed server data in HTML.
Add a new filter `script_module_data_{$module_id}` to associate data
with a Script Module. For example:

{{{#!php
add_filter(
	'script_module_data_MyScriptModuleID',
	function ( array $data ): array {
		$data['script-needs-this-data'] = 'ok';
		return $data;
	}
);
}}}

If the Script Module is included in the page, enqueued or as a
dependency, the associated data will be JSON-encoded and embedded in the
HTML in a `<script type="application/json">` tag with an ID of the form
`wp-script-module-data-{$module_id}` allowing the Script Module to
access the data on the client.

See the original proposal: https://make.wordpress.org/core/2024/05/06/proposal-server-to-client-data-sharing-for-script-modules/

Developed in https://github.com/WordPress/wordpress-develop/pull/6682.

Props jonsurrell, cbravobernal, westonruter, gziolo, bernhard-reiter, youknowriad, sergiomdgomes, czapla.
Fixes #61510. See #60647.
Built from https://develop.svn.wordpress.org/trunk@58579


git-svn-id: http://core.svn.wordpress.org/trunk@58026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 13:21:17 +00:00
Bernhard Reiter 3f2b674b36 Block Hooks: Refactor controller filter to use meta_input.
Prior to this changeset, the function `update_ignored_hooked_blocks_postmeta()` used the core function `update_post_meta()` to write `_wp_ignored_hooked_blocks` data to the database during an operation that is preparing a post to be inserted.

Since we have access to the incoming changes that are being prepared we can remove this database operation in favour of writing the data to the post object provided under `meta_input`.

Doing this means two things:

1. It allows us to store postmeta for new posts that are about to be created since they don't have an `ID` yet (which is information `update_post_meta()` needs).
2. The core controller will take care of updating postmeta in a more predictable pattern.

Props tomjcafferkey, bernhard-reiter.
Fixes #61495.
Built from https://develop.svn.wordpress.org/trunk@58578


git-svn-id: http://core.svn.wordpress.org/trunk@58025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 08:54:13 +00:00
gziolo 0c56c3f7dd Build: Remove legacy webpack DefinePlugin configuration
Follow-up [58193].
Fixes #61262.
Props jonsurrell.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-26 08:27:17 +00:00
Peter Wilson 7b1dd8d942 Set trunk version global to 6.7-alpha rather than RC1.
Follow up to [58575].

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


git-svn-id: http://core.svn.wordpress.org/trunk@58023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 23:10:23 +00:00