49366 Commits

Author SHA1 Message Date
Pascal Birchler
a6783cfbee Editor: disable shadow.defaultPresets in default theme.json.
This is a follow-up to [57717] to ensure that classic themes without a `theme.json` file or without `appearanceTools: true` in `theme.json` do not have shadow controls by default.

Props wildworks, vcanales, madhudollu, swissspidy, youknowriad.
Fixes #60633

git-svn-id: https://develop.svn.wordpress.org/trunk@57827 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-13 11:10:28 +00:00
Pascal Birchler
0d456e2f05 Interactivity API: Increase hook priority for processing directives.
Use a priority of 100 to ensure that other filters can add additional directives before the processing starts.
This way, directives will be processed even if the `$parsed_block` variable is edited by a filter.

Props cbravobernal, swissspidy, flixos90, joemcgill, gziolo.
Fixes #60743.

git-svn-id: https://develop.svn.wordpress.org/trunk@57826 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-13 10:46:53 +00:00
Pascal Birchler
47937685f7 Interactivity API: Do not process directives when there aren’t any.
Short-circuits directive processing when the markup does not actually contain any `data-wp-*` attributes.
This reduces function calls and memory usage for the best case scenario due to not involving `WP_HTML_Tag_Processor`.

Props joemcgill, swissspidy, gziolo, cbravobernal, flixos90.
Fixes #60749.

git-svn-id: https://develop.svn.wordpress.org/trunk@57824 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-13 10:39:54 +00:00
Dennis Snell
b1b97f9672 Interactivity API: Ensure proper directive processing on special elements.
Adds a test to ensure proper processing of directives on special HTML elements,
or HTML which contains special elements. These special elements are defined by
the HTML API and are the HTML elements which cannot contain other tags, such as
the IFRAME, SCRIPT, TEXTAREA, TITLE, elements, etc...

The server diretive processor performs a custom tracking of HTML structure and
this test ensures it isn't mislead by the handling of those special elements.

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

Props santosguillamot, cbravobernal, mukesh27, westonruter, swissspidy, dmsnell.
Follow-up to [57348].
Fixes #60746.



git-svn-id: https://develop.svn.wordpress.org/trunk@57822 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 18:52:20 +00:00
Pascal Birchler
234ec16baf Help/About: Update the About page for WP 6.5 RC2.
Updates a translatable string to use a placeholder for the “Requires Plugins” string used in it.

Props swissspidy, sergeybiryukov, presskopp.
See #60303.

git-svn-id: https://develop.svn.wordpress.org/trunk@57817 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 14:44:00 +00:00
Riad Benguella
d780917cd1 Editor: Update Packages with the latest bug fixes for 6.5 RC 2
It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59756/

Props get_dave, swissspidy, bernhard-reiter, youknowriad.
See #60315.

git-svn-id: https://develop.svn.wordpress.org/trunk@57814 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 14:06:51 +00:00
Sergey Biryukov
6b5ac38b18 Coding Standards: Use strict comparison in WP_Image_Editor_GD::_save().
Follow-up to [50810], [57524].

Props pbearne, mukesh27.
Fixes #60643.

git-svn-id: https://develop.svn.wordpress.org/trunk@57811 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 11:47:25 +00:00
Jb Audras
697bd4efd6 Help/About: Update the About page for WP 6.5 RC2.
This changeset removes the "Pattern overrides" section from features.
Also updates the field guide link, this link should redirect correctly once the post is published.

Follow-up to [57715], [57767].

Props ryelle, benjamin_zekavica.
See #60303.





git-svn-id: https://develop.svn.wordpress.org/trunk@57809 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 10:35:55 +00:00
Dennis Snell
3c2a87e2ae HTML API: Add tests ensuring text nodes reconstruct active formatting elements.
Adds tests that should have been merged in [57806].

Follow-up to: [57806].



git-svn-id: https://develop.svn.wordpress.org/trunk@57807 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 00:24:11 +00:00
Dennis Snell
2452282fa6 HTML API: Trigger active format reconstruction when reaching text nodes.
When encountering text nodes in an HTML document, the HTML parser needs
to run the active format reconstruction algorithm, even if it doesn't
stop to visit those text nodes. This is because the formats, which might
need reconstructing, will impact the breadcrumbs of all downstream nodes
from the text node.

In this patch, this process is triggered, which properly triggers the
active format reconstruction. It also enables the visiting of other token
types as is possible in the Tag Processor.

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

Props: dmsnell, jonsurrell, westonruter.
Fixes: #60455.
Follow-up to: [57348].



git-svn-id: https://develop.svn.wordpress.org/trunk@57806 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-12 00:22:40 +00:00
Dennis Snell
dabde02a67 HTML API: Defer applying attribute updates until necessary.
When making repeated updates to a document, the Tag Processor will end
up copying the entire document once for every update. This can lead to
catastrophic behavior in the worse case.

However, when batch-applying updates it's able to copy chunks of the
document in one thread and only end up copying the entire document once
for the entire batch.

Previously the Tag Processor has been eagerly applying udpates, but in
this patch it defers applying those updates as long as is possible.

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

Props: dmsnell, bernhard-reiter, jonsurrell, westonruter.
Fixes #60697.
Follow-up to [55706], [56941], [57348].



git-svn-id: https://develop.svn.wordpress.org/trunk@57805 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 23:53:07 +00:00
Peter Wilson
e3a520606d REST API: Remove unnecessary upload overrides in font face controller.
This removes settings that are the default value or required for side-loading from the `WP_REST_Font_Faces_Controller::handle_font_file_upload()`. 

This is to harden the endpoint and future proof against any changes to `wp_handle_upload()` and related functions/security checks.

Props peterwilsoncc, dd32.
Fixes #60741.



git-svn-id: https://develop.svn.wordpress.org/trunk@57804 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 23:14:26 +00:00
Jb Audras
e5a779515c Docs: Update various HelpHub links to avoid unnecessary redirections.
Follow-up to [57793], [57798], [57800].

Props mkismy.
See #60732, #60699.





git-svn-id: https://develop.svn.wordpress.org/trunk@57801 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 14:06:51 +00:00
Jb Audras
68fa550fc6 Docs: Update various HelpHub links located in bundled themes to avoid unnecessary redirections.
Props mkismy.
See #60732, #60699.





git-svn-id: https://develop.svn.wordpress.org/trunk@57800 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 13:58:33 +00:00
bernhard-reiter
d09c0f5c4c Block Hooks: Remove filter global reset from test teardown.
Resetting the `$wp_current_filter` global during test teardown is unnecessary, as it is taken care of by the unit test's base class.

This changeset removes the reset accordingly.

Follow-up [57790].
Props swissspidy, timothyblynjacobs.
See #60671.

git-svn-id: https://develop.svn.wordpress.org/trunk@57799 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 12:52:18 +00:00
Sergey Biryukov
4c52fe78b5 Docs: Update the link to the “Editing wp-config.php” article in wp-load.php.
Follow-up to [57793].

Props fanly, shailu25.
See #60738, #60732.

git-svn-id: https://develop.svn.wordpress.org/trunk@57798 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-11 10:03:19 +00:00
Sergey Biryukov
45ec568f0c Docs: Update the link to the WordPress Feeds article on Reading Settings screen.
Follow-up to [57793].

Props ignatiusjeroe, sabernhardt, shailu25.
Fixes #60736. See #60732.

git-svn-id: https://develop.svn.wordpress.org/trunk@57797 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-10 16:18:40 +00:00
Sergey Biryukov
db9058c101 Upload: Move an assignment in wp-admin/upload.php into a conditional branch.
This is a micro-optimization to reduce unnecessary memory allocation.

Follow-up to [28682].

Props mujuonly, swissspidy, mukesh27.
Fixes #60683.

git-svn-id: https://develop.svn.wordpress.org/trunk@57796 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-09 18:05:27 +00:00
Jonathan Desrosiers
0acfd3a72c Build/Test Tools: Do not run Props Bot for certain actions from forks.
For PRs that originate from forked repositories, `pull_request_review` and `pull_request_review_comment` events do not have the permissions necessary to comment on the PR.

This avoids needlessly running the bot when these conditions are met.

Props jorbin, wildworks.
See #60733.

git-svn-id: https://develop.svn.wordpress.org/trunk@57795 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-09 01:07:52 +00:00
Jb Audras
f0e61db004 Coding Standards: Fix a WPCS indentation issue found in wp-admin/options-general.php after [57793].
See #60732.





git-svn-id: https://develop.svn.wordpress.org/trunk@57794 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-08 22:42:14 +00:00
audrasjb
14d55b80dc Docs: Update various HelpHub links to avoid unnecessary redirections.
This updates various WP-Admin related links that have been redirected to new HelpHub pages, to avoid unnecessary redirections.

Props mkismy.
See #60732, #60699.





git-svn-id: https://develop.svn.wordpress.org/trunk@57793 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-08 22:36:01 +00:00
Jb Audras
968780bb4b Toolbar: Fix dropdown admin menu styles on front-end.
This changeset switches back the admin menu items `height` property to `px` unit to prevent issues with themes using `html { font-size: 62.5%; }`.

Follow-up to [57765].

Props bgnicolepaschen, sabernhardt, huzaifaalmesbah, ironprogrammer, shailu25.
Fixes #60707.
See #43633.





git-svn-id: https://develop.svn.wordpress.org/trunk@57792 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-08 22:09:29 +00:00
Sergey Biryukov
ac2ba69de7 Plugins: Remove extra space in a translatable string.
Follow-up to [57545].

Props Presskopp.
Fixes #60730.

git-svn-id: https://develop.svn.wordpress.org/trunk@57791 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-08 14:32:43 +00:00
bernhard-reiter
9a616a5734 Block Hooks: Use new Templates Controller filter instead of action.
This changeset adds a new `rest_pre_insert_{$this->post_type}` filter in the `WP_REST_Templates_Controller`, where it is applied to the return value of the `prepare_item_for_database` method. (This is consistent with the `WP_REST_Post_Controller`, where that filter has existed before.)

The new filter is then used to inject hooked blocks into the template (or template part) content received via the endpoint, prior to persisting it to the database.

This supersedes the previous mechanism, which was using the `rest_after_insert_{$this->post_type}` ''action'', from which it performed an additional `wp_update_post` call to update the template (part) content with the hooked blocks injected. The new technique eschews that additional call and the resulting extra revision it created, as well as a problem with regard to duplicated escaping and sanitization, which had caused some special characters to be garbled.

Props tomjcafferkey, gziolo, swissspidy, karolmanijak.
Fixes #60671.

git-svn-id: https://develop.svn.wordpress.org/trunk@57790 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 14:10:31 +00:00
Adam Silverstein
a38f5a1305 Script loader: enable fetchpriority attribute in the wp_preload_resources filter.
Add `fetchpriority` to the attributes accepted by the `wp_preload_resources` filter. Developers can now use this filter to set fetchpriority for resources being preloaded.

Props nihar007, luboslives, tabrisrp.
Fixes #58510.



git-svn-id: https://develop.svn.wordpress.org/trunk@57789 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 07:06:53 +00:00
Pascal Birchler
da1e42392c Build/Test Tools: Fix typo in variation-new-font-family.json fixture file.
Props huzaifaalmesbah, mukesh27.
Fixes #60712.

git-svn-id: https://develop.svn.wordpress.org/trunk@57788 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 06:25:33 +00:00
Sergey Biryukov
ce88530920 Docs: Add a description for the $table_prefix global.
Follow-up to [57748].

See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@57787 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 06:09:09 +00:00
Jonathan Desrosiers
a7a891aa3c Upload: Add links back to installer pages.
This adds a link back to the plugin or theme installers when an incompatible archive error message is encountered.

Props Presskopp, swissspidy, smub, pmbaldha, aneeshd16.
Fixes #60578.

git-svn-id: https://develop.svn.wordpress.org/trunk@57786 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-07 05:56:49 +00:00
Sergey Biryukov
f3e19bf566 Docs: Add a description for the $wp_embed global.
Follow-up to [57748].

See #60699.

git-svn-id: https://develop.svn.wordpress.org/trunk@57785 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-06 05:04:00 +00:00
Jonathan Desrosiers
37f53c0af7 Build/Test Tools: Bump version of trunk in the package-lock.json file.
Follow up to [57782].

git-svn-id: https://develop.svn.wordpress.org/trunk@57784 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-06 00:55:18 +00:00
Jonathan Desrosiers
a227c14479 Build/Test Tools: Add build process test workflow to old branches testing.
Now that 6.5 has been branched, the `test-build-processes.yml` workflow can be added to the list of workflows to run for old branches.

Fixes #59632.

git-svn-id: https://develop.svn.wordpress.org/trunk@57783 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-06 00:32:33 +00:00
David Baumwald
1a9c58fdbe Trunk is now 6.6 alpha.
git-svn-id: https://develop.svn.wordpress.org/trunk@57782 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 17:16:07 +00:00
Jb Audras
dadca45ae0 Post WordPress 6.5 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@57778 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 16:23:49 +00:00
Jb Audras
b6bc25b10e WordPress 6.5 RC1.
git-svn-id: https://develop.svn.wordpress.org/trunk@57777 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 16:11:04 +00:00
Jb Audras
6818eb519d Plugins: Fix an overlap issue with plugin cards dependencies notice.
This changeset fixes an issue where plugin card dependencies notice and plugin icon were overlapping in some cases.

Props costdev, euthelup, shailu25, desrosj, swissspidy, audrasjb.
Fixes #60501.





git-svn-id: https://develop.svn.wordpress.org/trunk@57776 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 14:26:01 +00:00
Jb Audras
19c57a21fd Partially revert [57774].
This reverts some changes that need to be properly synced from Gutenberg.

See #60677.





git-svn-id: https://develop.svn.wordpress.org/trunk@57775 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 13:57:37 +00:00
Jb Audras
8dbf39e28a Docs: Add missing @global mention in wp_interactivity().
This merges a changeset updated upstream in the Gutenberg repository.
See https://github.com/WordPress/gutenberg/pull/59522.

Props wildworks.
Fixes #60677.
See #59651.





git-svn-id: https://develop.svn.wordpress.org/trunk@57774 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 13:37:51 +00:00
Sergey Biryukov
56297f5000 Coding Standards: Remove some extra trailing spaces.
Follow-up to [57772].

See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57773 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 11:52:05 +00:00
Sergey Biryukov
eab2cb9a4f Docs: Document the usage of $_paused_plugins and $_paused_themes globals.
Follow-up to [44973].

Props upadalavipul, sabernhardt.
See #60021.

git-svn-id: https://develop.svn.wordpress.org/trunk@57772 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 11:41:53 +00:00
Jonathan Desrosiers
7002bce8ab Coding standards: Apply some changes after composer format.
Follow up to [57565], [57627], [57755], 

See #60233, #60506, #60524.

git-svn-id: https://develop.svn.wordpress.org/trunk@57771 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 06:53:44 +00:00
Jonathan Desrosiers
17f692b374 Plugins: Improve plugin dependency related error messages.
This makes several refinements to the various error messages displayed throughout the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.

Props costdev, swissspidy, afragen, huzaifaalmesbah, knutsp.
Fixes #60465.

git-svn-id: https://develop.svn.wordpress.org/trunk@57770 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 06:46:34 +00:00
Jonathan Desrosiers
a2c196cc49 Plugins: Improve plugin dependency admin notices.
This makes several refinements to the various notices displayed in the WordPress admin related to plugin dependencies. Additionally, it adds some conditions to display more appropriate messages for multisite installs with proper context to the user’s capabilities.

Props costdev, joedolson, afragen, swissspidy, peterwilsoncc, euthelup.
Fixes #60465.

git-svn-id: https://develop.svn.wordpress.org/trunk@57769 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 06:25:22 +00:00
Dennis Snell
4d562a102d HTML API: Ensure that breadcrumbs are properly retained after seeking.
In some cases, it's possible to seek back into a location found inside
an element which has been closed before the point in the document where
the `seek()` was made. In these cases the breadcrumb stack is lost, and
calling `get_breadcrumbs()` after the seek will return the wrong information.

In this patch, the HTML Processor takes a conservative approach and
moves to the front of the document, then reparses the document until
it reaches the sought-after location. This ensures consistency on
the stack of open elements and active formats, and preserves
breadcrumbs.

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

Props jonsurrell.
Follow-up to [60687].
See #58517.
Fixes #60687.



git-svn-id: https://develop.svn.wordpress.org/trunk@57768 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 05:32:19 +00:00
Kelly Choyce-Dwan
70f374677c 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, two unencoded apostrophes have been replaced in strings.

Props benjamin_zekavica, richtabor, laurlittle.
See #60303.



git-svn-id: https://develop.svn.wordpress.org/trunk@57767 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 03:01:09 +00:00
Aaron Jorbin
115b2970b8 UI-Copy: Use capital cased singular for Site Icon.
Follow up to [41749], [57713], and [57730].

Props johnbillion, audrasjb.
Fixes #60686.



git-svn-id: https://develop.svn.wordpress.org/trunk@57766 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-05 00:10:37 +00:00
Joe Dolson
44c41a52cf Toolbar: Polish design and code combining duplicate profile links.
Fixes some design changes and improves quality of comments and code styles following previous changes. Follow-up to [57708].

Props sabernhardt, huzaifaalmesbah, joedolson.
Fixes #43633. See #34668.

git-svn-id: https://develop.svn.wordpress.org/trunk@57765 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 21:48:29 +00:00
Anthony Burchell
80adc0b5f7 Media: Use consistent spacing for the media toolbar in both grid and list view.
Previously, the spacing between media toolbar elements in grid and list view did not match. We now use the same select margin across both views.

Props desrosj, seusmaniqbal, ianbelanger, subrataemfluence, sabernhardt, pooja1210, sumitbagthariya16, shailu25, devmuhib, huzaifaalmesbah, audrasjb.
Fixes #43904.


git-svn-id: https://develop.svn.wordpress.org/trunk@57764 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 17:40:06 +00:00
Pascal Birchler
787601dc8e I18N: Cast magic MO marker number to integer.
In gettext, `0x950412de` is used to signal GNU MO files. In `WP_Translation_File_MO` this magic marker is used to detect whether a file uses little endian or big endian.

On 32 bit systems, this number will be interpreted by PHP as a float rather than an integer. This change adds extra casting to force an integer.

A similar change was done in the pomo library in the past, see #3780.

Props tmatsuur, swissspidy.
Fixes #60678.

git-svn-id: https://develop.svn.wordpress.org/trunk@57763 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 15:52:04 +00:00
Pascal Birchler
d61c508896 Interactivity API: Rename data_wp_context() to wp_interactivity_data_wp_context().
Increases clarity about where the function belongs to, bringing it in line with other related functions.

After initially merging this change in [57742] and reverting it in [57743], this reintroduces it now that the Gutenberg packages have been updated accordingly in [57760].

Props swissspidy, gziolo, cbravobernal, youknowriad, ankitmaru, westonruter, luisherranz, darerodz.
Fixes #60575.

git-svn-id: https://develop.svn.wordpress.org/trunk@57762 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 15:37:53 +00:00
Jb Audras
0f45a3c9fc Docs: Update WP_Query::tax_query docblock to reflect that the property can be null.
Props manooweb, swissspidy.
Fixes #60563.





git-svn-id: https://develop.svn.wordpress.org/trunk@57761 602fd350-edb4-49c9-b593-d223f7449a82
2024-03-04 14:46:04 +00:00