Commit Graph

37037 Commits

Author SHA1 Message Date
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
audrasjb dfe2d45189 Post WordPress 6.6 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@58573


git-svn-id: http://core.svn.wordpress.org/trunk@58021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 16:21:18 +00:00
audrasjb 7fd0e372bb WordPress 6.6 RC1.
Built from https://develop.svn.wordpress.org/trunk@58572


git-svn-id: http://core.svn.wordpress.org/trunk@58020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 16:10:24 +00:00
Aaron Jorbin 02ffbdb479 Media: unfix admin image cropping calculations.
[58456] introduced some failures to the automated test system that indicate this fix is incomplete.

See #32282.
Props hellofromtonya, audrasjb, andrewserong, kevin940726, oglekler.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 15:32:16 +00:00
Aaron Jorbin 9da0418c41 Filesystem: Normalize allowed_files so comparison is apples to apples.
In [58470] a change was made to normalize the filename in validate_file, however this leads to instances where the list of files that are allowed aren't normalized such as in the theme editor. By normalizing the array, the comparison is apples to apples.

Fixes #61488.
Props jorbin, hellofromtonya, swissspidy, misulicus, script2see, Presskopp, audrasjb, peterwilsoncc, siliconforks, littler.chicken, paulkevan,

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


git-svn-id: http://core.svn.wordpress.org/trunk@58018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 14:19:12 +00:00
desrosj 3b4a816522 Build/Test Tools: Run `npm audit fix`.
This runs `npm audit fix` to address upstream issues with dependencies.

See #61498.
Built from https://develop.svn.wordpress.org/trunk@58569


git-svn-id: http://core.svn.wordpress.org/trunk@58017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 14:15:17 +00:00
ryelle 53cb6c903b Help/About: Update the About page for 6.6.
Introducing the new content for the 6.6 About page. This release, the About page will have just the highlights for 6.6, and link off to the release page on WordPress.org for the full overview.

See #61320, https://github.com/WordPress/gutenberg/issues/62631.
Props ryelle, andrewserong, annezazu, joen, beafialho, richtabor, kristastevens, marybaum, cbringmann, DanSoschin, youknowriad.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:59:14 +00:00
desrosj a9bc14866c Build/Test Tools: Run `grunt precommit:css`.
This rebuilds compiled CSS files after updating the `caniuse` database in [58563].

All `-webkit-clip-path` properties have been removed as the corresponding browsers dipped below 1% usage and have fallen out of the browser support policy.

Fixes #61499.
Built from https://develop.svn.wordpress.org/trunk@58567


git-svn-id: http://core.svn.wordpress.org/trunk@58015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:56:17 +00:00
audrasjb 01a0462229 Coding Standards: Fix WPCS issue found after [58564].
Unprops audrasjb.
See #61153.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:54:14 +00:00
ellatrix 98595e5229 Editor: Update packages for 6.6 RC 1.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.
See https://github.com/WordPress/wordpress-develop/pull/6902.
See https://github.com/WordPress/gutenberg/tree/wp/6.6.

Fixes #61497.

Props ellatrix, jorbin.


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


git-svn-id: http://core.svn.wordpress.org/trunk@58013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:49:28 +00:00
audrasjb d56f24e6db Help/About: Update some help text in the admin area.
This takes into account the changes from #47125 and updates the related Help Tabs content accordingly.

Follow-up to [56515].

Props johnbillion, renishsurani, faisal03, shailu25, sumitbagthariya16, Ankit-K-Gupta, oglekler, rajinsharwar, hmbashar, huzaifaalmesbah.
Fixes #61153.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:34:19 +00:00
desrosj 99dfd1ca08 Build/Test Tools: Update npm `devDependencies` 6.6.
This updates the npm `devDependencies` for Core to their latest versions, with one exception. The latest version of `sinon` causes some test failures and requires more investigation.

Fixes #61498.
Built from https://develop.svn.wordpress.org/trunk@58563


git-svn-id: http://core.svn.wordpress.org/trunk@58011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 13:05:27 +00:00
desrosj a2be26732d Build/Test Tools: Update npm dependencies for Bundled Themes.
This updates the npm dependencies for the Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One themes. `npm audit fix` has also been run.

See #61498.
Built from https://develop.svn.wordpress.org/trunk@58562


git-svn-id: http://core.svn.wordpress.org/trunk@58010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 12:49:10 +00:00
Sergey Biryukov e0a3dd8ee6 Docs: Correct DocBlock formatting in `wp-includes/blocks.php`.
Follow-up to [58471].

Props david.binda, narenin, sabernhardt, shital-patel, SergeyBiryukov.
Fixes #61493.
Built from https://develop.svn.wordpress.org/trunk@58561


git-svn-id: http://core.svn.wordpress.org/trunk@58009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 12:45:18 +00:00
audrasjb c8ea512ba4 Docs: Fix apostrophe usage in `wp-admin/includes/class-wp-list-table.php`.
Props truptikanzariya, mukesh27.
Fixes 61490.
See 60699.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 08:59:21 +00:00
audrasjb a999cdbaf9 HTML API: Remove unused `$tag_name` variable in `WP_HTML_Tag_Processor::set_attribute`.
Follow-up to [58472], [58473].

Props davidbinda.
Fixes #61494.



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


git-svn-id: http://core.svn.wordpress.org/trunk@58007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 08:53:21 +00:00
dmsnell a636cd1c42 HTML API: Add missing subclass methods to HTML Processor and add token provenance.
This patch introduces two related changes:

 - It adds missing subclass methods on the HTML Processor which needed
   to be implemented since it started visiting virtual nodes. These
   methods need to account for the fact that not all tokens truly exist.

 - It adds a new concept and internal method, `is_virtual()`, indicating
   if the currently-matched token comes from the raw text in the input
   HTML document or if it was the byproduct of semantic parsing rules.
   This internal method and new vocabulary around token provenance
   considerably simplifies the logic spread throughout the rest of the
   class and its subclass methods.

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

Follow-up to [58304].

Props dmsnell, jonsurrell, gziolo.
See #61348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-25 03:11:19 +00:00
Tammie Lister e5d85a4490 Twenty Twenty and Twenty Twenty-One: Fixes code tag showing outside of section area.
The code tag had a formatting issue where it was showing outside of the section area. This resolves it in both themes.

Props ravipatel, SergeyBiryukov, poena, sabernhardt, peterwilsoncc.
Fixes #52780.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 19:51:11 +00:00
Tammie Lister 94d48db3ea Twenty Nineteen: Fixes button block padding within the editor.
The button block padding was not the same in the editor and front. This resolves that issue with the font size having being resolved in a previous ticket.

Props pitamdey, sabernhardt.
Fixes #61235.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 19:24:10 +00:00
Aaron Jorbin 1c040d163f Post WordPress 6.6 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@58555


git-svn-id: http://core.svn.wordpress.org/trunk@58003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 19:16:11 +00:00
Aaron Jorbin a17c491de0 WordPress 6.6 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@58554


git-svn-id: http://core.svn.wordpress.org/trunk@58002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 18:42:09 +00:00
Aaron Jorbin f2cbb565e4 Update packages to include latest changes.
Props desrosj.

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


git-svn-id: http://core.svn.wordpress.org/trunk@58001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 18:38:18 +00:00
Sergey Biryukov 3c44824db7 Tests: Use `assertSame()` in `WP_Theme_JSON` 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 [55959], [55986], [57547], [57716], [58244], [58422].

See #60706.
Built from https://develop.svn.wordpress.org/trunk@58478


git-svn-id: http://core.svn.wordpress.org/trunk@57927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 15:16:27 +00:00
audrasjb 10c123044c HTML API: Code improvements following [58472].
Props xknown, jorbin.
Unprops audrasjb.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 14:57:13 +00:00
audrasjb 46851b83eb HTML API: Run URL attributes through `esc_url()`.
Props dmsnell, xknown, jorbin, gziolo.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 14:45:10 +00:00
audrasjb 31465cc574 Editor: Sanitize Template Part HTML tag on save.
Props xknown, peterwilsoncc, jorbin, bernhard-reiter, azaozz.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 14:42:09 +00:00
audrasjb abc2db829a Editor: Fix Path Traversal issue on Windows in Template-Part Block.
Props xknown.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 14:38:16 +00:00
Tammie Lister 5e554da546 Twenty Seventeen: Resolves default border style visibility for pullquote block.
When a border color and width was added to the pullquote block but no border style was chosen the border was not visible. The expectation is that the border has a solid style by default when a color is selected.

Props pranitdugad, poena, sabernhardt.
Fixes #61362.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 11:19:13 +00:00
oandregal 2db12b5ec2 Format: fix spaces for @param.
Props oandregal, mukesh27.

See #61451.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 10:33:15 +00:00
Tammie Lister 80d42663e6 Twenty Twenty-Three: Resolves aubergine variation background implementation height impact on header.
The aubergine header causes issues when a block can change the page height. This resolves that swapping to clamp.

Props annezazu, sabernhardt, mikachan.
Fixes #58475.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 10:27:13 +00:00
oandregal 6476fd96ec Section styles: improve performance and conceptual consistency.
These changes involve:

- Move shared variation definitions from styles.blocks.variations to styles.variations
- Remove blockTypes from styles.variations.
- Do not register shared variations from theme style variation or primary theme.json files.
- Move the merging of theme.json data into the WP_Theme_JSON_Resolver and WP_Theme_JSON classes.

These changes improve performance and are more future-proof API wise.
See conversation at https://github.com/WordPress/gutenberg/issues/62686

Props aaronrobertshaw, oandregal, andrewserong, joemcgill, talldanwp, andrewserong, ramonopoly, richtabor, youknowriad.

See #61312, #61451.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-24 08:51:16 +00:00
Tammie Lister 7ef5f945dc Twenty Twenty-One: Fixes compiling tests [58464].
Compiling fix to sort tests.

See #61082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-23 14:52:10 +00:00
Tammie Lister fe4e25babc Twenty Twenty-One: Fixes font size difference in latest comments block.
The font size was different in the last comments block depending on if it was in the editor or front. This resolves that by checking block for special font size before applying default and using inherit for nested elements.

Props pitamdey, sabernhardt.
Fixes #61082.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-23 14:38:11 +00:00
Tammie Lister f46632a0f1 Twenty Fourteen: Resolves post content links not being underlined.
In the page list block the text decoration was not the same on the front as the editor. This adds underline to links when in the post editor classic or block. This does not resolve the font size issue that needs to be fixed in block editor reset styles.

Props viralsampat, sabernhardt.
Fixes #61441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-23 13:37:16 +00:00
Sergey Biryukov 5bde3fbd1f Tests: Use `assertSame()` in `wp_get_block_css_selector()` 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 [56058].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58462


git-svn-id: http://core.svn.wordpress.org/trunk@57911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-23 11:40:14 +00:00
Tammie Lister c8ae20d663 Twenty Seventeen: Resolves calendar block header cells not centering.
The calendar header block cells were not centered. This resolves that both in front and back.

Props nkeller15, sabernhardt, shailu25.
Fixes #58547.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-23 10:36:13 +00:00
Sergey Biryukov 1925595cd8 Networks and Sites: Exit after `wp_redirect()` in `wp-admin/ms-options.php`.
This brings more consistency with the other files having the same pattern:

* `wp-admin/moderation.php`
* `wp-admin/ms-admin.php`
* `wp-admin/ms-edit.php`
* `wp-admin/ms-sites.php`
* `wp-admin/ms-themes.php`
* `wp-admin/ms-upgrade-network.php`
* `wp-admin/ms-users.php`

Follow-up to [15481], [16847].

Props jigar-bhanushali, jorbin, johnbillion, Presskopp, rajinsharwar, audrasjb, SergeyBiryukov.
Fixes #60926.
Built from https://develop.svn.wordpress.org/trunk@58460


git-svn-id: http://core.svn.wordpress.org/trunk@57909 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-22 11:47:16 +00:00
audrasjb 22f7f98451 Twenty Twenty-Three: Remove untranslatable text strings in pagination links.
This changeset removes text strings from the query pagination block that are not translatable without adding them to patterns.
This means that the texts now use the default translation for the block from WordPress, not the theme. The archive, search and home templates now match the text in the query pagination in the index template.

Props poena.
Fixes #60298.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-22 07:33:14 +00:00
Sergey Biryukov ed8ccc7536 Tests: Use named data provider in `iso8601_to_datetime()` tests.
Follow-up to [54230], [58164].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58458


git-svn-id: http://core.svn.wordpress.org/trunk@57907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 21:36:16 +00:00
joedolson 9360266c51 Media: Fix implicit conversion from float to int in image cropping.
Cast crop values to integers to prevent PHP error caused by implicit conversion from `float` to `int` values when cropping images using ImageMagick.

Props skithund, mai21, nicomollet, amanias1977, joedolson.
Fixes #59782.
Built from https://develop.svn.wordpress.org/trunk@58457


git-svn-id: http://core.svn.wordpress.org/trunk@57906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 20:37:11 +00:00
joedolson 10bccbd392 Media: Fix admin image cropping calculations.
The admin image editor crop function introduced rounding errors by using a scaled image to calculate values. Fix uses the image at 100% scale for calculations. Also avoid recalculating selection when the selection position is changed, and prevent incorrect values after scaling or restoration.

Props Jossnaz, johnillo, shailu25, rachelbaker, sudipatel007, joedolson.
Fixes #32282.
Built from https://develop.svn.wordpress.org/trunk@58456


git-svn-id: http://core.svn.wordpress.org/trunk@57905 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 19:51:15 +00:00
joedolson 53a0d9e498 Administration: A11y: Add `role="alert"` on JS injected admin notices.
Add the attribute `role="alert"` on 12 instances of admin notices that are injected into the DOM using JavaScript. The `role="alert"` attribute allows screen readers to recognize the addition to the DOM and announce the errors to users.

Props afercia, cyrus11, rcreators, joedolson.
Fixes #47111.
Built from https://develop.svn.wordpress.org/trunk@58455


git-svn-id: http://core.svn.wordpress.org/trunk@57904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 18:17:14 +00:00
hellofromTonya 754f50d1b9 Docs: Document `$clauses` associative array in `*-clauses` filters.
Document each element within the filter parameter `$clauses` associative array structure for the `'comments_clauses'`, `'networks_clauses'`, and `'sites_clauses'` filters.

This change:
* Brings consistency amongst the `WP_[*_]Query` filters.
* Helps to improve understanding.
* Helps to avoid confusion of the purpose for `pieces` and `clauses`.

Follow-up to [53376], [53375], [52974].

Props david.binda, audrasjb, hellofromTonya, ironprogrammer, johnbillion, oglekler, SergeyBiryukov.
Fixes #61307.
Built from https://develop.svn.wordpress.org/trunk@58454


git-svn-id: http://core.svn.wordpress.org/trunk@57903 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 17:26:14 +00:00
Tammie Lister 953941b344 Twenty Eleven: Resolves pullquote block ignoring font weight and style settings.
The pullquote block was ignoring font weight and style settings. This now brings in a fix using inherit.

Props nidhidhandhukiya, desrosj, sabernhardt.
Fixes #56695.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 14:31:15 +00:00
jorgefilipecosta 2613ed9ea5 REST API: Add template and template_lock to post types endpoint.
Adds template and template_lock property of the post type to post types REST API endpoint.
This change allows us to fix a bug where the template of a page is not respected when creating a new page on the site editor.

Props jorgefilipecosta, oandregal, timothyblynjacobs, mukesh27.
Fixes #61477.
Built from https://develop.svn.wordpress.org/trunk@58452


git-svn-id: http://core.svn.wordpress.org/trunk@57901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 13:06:12 +00:00
Tammie Lister 3e0408db89 Twenty Nineteen: Includes a contributing text file with Sass compiler instructions.
This adds in a useful file to know how to compiled this theme. As there was previously a contributing file with instruction on this in the GitHub repo that was not brought into svn, this fixes that.

Props kjeller, nielslange, sabernahardt.
Fixes #46108.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-21 10:27:17 +00:00
joedolson 95971e18b1 Editor: A11y: Set ARIA attributes for Classic Editor link inserter.
Set `aria-modal` and `aria-hidden` attributes when the Classic Editor link inserter modal is active, so that content behind the modal will be properly treated as inert when interacting with the modal.

Props lyonmuller, jwgoedert, sabernhardt, alexstine, afercia, rajinsharwar, rcreators, audrasjb, hmbashar, joedolson.
Fixes #60799.
Built from https://develop.svn.wordpress.org/trunk@58450


git-svn-id: http://core.svn.wordpress.org/trunk@57899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 20:27:11 +00:00
joedolson 026c9a8585 Administration: A11y: Use `aria-haspopup` only if item has popup behavior.
Update behavior of admin menu so that the `aria-haspopup` attribute is only applied in responsive mode, when there is a popup behavior present. Add `aria-expanded` attributes to report current popup state.

Props afercia, khokansardar, ryokuhi, joedolson.
Fixes #43095.
Built from https://develop.svn.wordpress.org/trunk@58449


git-svn-id: http://core.svn.wordpress.org/trunk@57898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 19:41:15 +00:00
Adam Silverstein ed1f32fac7 Media: improve titles when inserting via REST API.
Match the naming behavior for uploaded media in the REST API to the way media is named when uploading in the media library. Fix an issue where dashes were replacing spaces unnecessarily. 

Props abitofmind, kadamwhite, spacedmonkey, adamsilverstein, audrasjb, hellofromTonya.
Fixes #57957.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 16:04:12 +00:00
Sergey Biryukov f4989bdf32 Plugins: Correct plugin card layout when incompatible plugin message is displayed.
This replaces an erroneous `printf()` call with `sprintf()` that was missed when updating this fragment to use `wp_admin_notice()`.

Follow-up to [56571].

Props wojtekn, sabernhardt, rajinsharwar.
Fixes #61465.
Built from https://develop.svn.wordpress.org/trunk@58446


git-svn-id: http://core.svn.wordpress.org/trunk@57895 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 15:32:11 +00:00
isabel_brison 43b4079e2b Editor: fix root padding for children of alignfull flow layouts.
Updates the root padding CSS selectors so direct children of full width container blocks with flow layout receive padding.

Props isabel_brison, aaronrobertshaw.
Fixes #61464.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-20 08:03:14 +00:00
Joe McGill b9096d9c7f Editor: Improve compatibility for `WP_Theme_JSON_Data`.
This checks that objects returned from any of the `wp_theme_json_data_` filters are `WP_Theme_JSON_Data` objects in order to avoid incompatibilities. Otherwise, reprocess the theme.json data as new `WP_Theme_JSON` objects to ensure the data matches the expectations of code consuming that data.

Follow-up to [58185].

Props joemcgill, adamsilverstein, oandregal, ryelle, ocean90, pbearne.
See #61112.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-19 16:41:13 +00:00
Sergey Biryukov dd55b026a8 Twenty Seventeen: Optimize theme screenshot.
This further reduces image size by ~1.5 KB after running `npm run grunt precommit:image`.

Follow-up to [38833], [57322].

See #58996.
Built from https://develop.svn.wordpress.org/trunk@58442


git-svn-id: http://core.svn.wordpress.org/trunk@57891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-19 10:33:13 +00:00
dmsnell c15b15dd66 HTML API: Prevent Open Elements class from waking up.
This class accepts a Closure, but it should not be possible
to wake up with one from a serialized class instance.

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

Props jonsurrell.
See #61348.
Follow-up to [58304].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 17:41:08 +00:00
hellofromTonya 6eef6c73ce Post WordPress 6.6 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@58440


git-svn-id: http://core.svn.wordpress.org/trunk@57889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 16:32:11 +00:00
hellofromTonya c09558808f WordPress 6.6 Beta 3.
Built from https://develop.svn.wordpress.org/trunk@58439


git-svn-id: http://core.svn.wordpress.org/trunk@57888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 16:19:10 +00:00
hellofromTonya b037dc4c00 Toolbar: Fix ARIA [role] on menu descendants.
Adds a `role="group"` to the WordPress admin bar menu list items to fix the following accessibility issue:
{{{
Elements with an ARIA [role] that require children to contain a specific [role] are missing some or all of those required children.
}}}

Reference:
* [https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/group_role ARIA: group role] via mdn web docs

Follow-up to [42128], [21193], [19558]. 

Props heinperu, joedolson, krupajnanda, rajinsharwar, rcreators, sabernhardt.
Fixes #60919.
Built from https://develop.svn.wordpress.org/trunk@58438


git-svn-id: http://core.svn.wordpress.org/trunk@57887 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:52:07 +00:00
hellofromTonya f5aa4c90bc Code Modernization: Fix non-nullable deprecation in get_available_post_mime_types().
Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `get_available_post_mime_types()`:

{{{
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in ./wp-includes/post.php on line 3395
}}}

[https://developer.wordpress.org/reference/functions/get_available_post_mime_types/#return This function is documented] to:
* Return `An array of MIME types.`
* as an array of `string`s, i.e. `string[]`.

A `null` or empty element within the returned array is not a valid MIME type. If a `null` exists in the returned array, it is the root cause of PHP throwing the deprecation notice.

This commit removes the `null` and empty elements from the returned array of MIME types. It also adds a unit test.

Follow-up to [56623], [56452].

Props nosilver4u, jrf, ironprogrammer, antpb, antonvlasenko, rajinsharwar, hellofromTonya. 
Fixes #59195.
Built from https://develop.svn.wordpress.org/trunk@58437


git-svn-id: http://core.svn.wordpress.org/trunk@57886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:46:10 +00:00
costdev 6b458a50bf Upgrade/Install: Disable maintenance mode when core auto-update fails.
In [58128], additional maintenance mode calls were added to the automatic updates process. However, there is an early return if a 'core' automatic update fails.

Maintenance mode isn't disabled until later in the `WP_Automatic_Updater::update()` method. This means that maintenance mode may continue to be enabled despite the core update being treated as a skipped update.

This disables maintenance mode before the early return.

Follow-up to [58128].

Props costdev, hellofromTonya, peterwilsoncc.
Fixes #61459. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58436


git-svn-id: http://core.svn.wordpress.org/trunk@57885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:41:05 +00:00
costdev 09848f0151 Upgrade/Install: Delay automatic updates after installation.
After installation, the user is directed to the `Log In` page. This triggers the `wp_schedule_update_checks()` function which is hooked to `init` and schedules updates to run immediately if no other events exist. As a result of more robust use of maintenance mode for automatic updates added in [58128], the user may be presented with a maintenance mode screen just after installing WordPress.

To improve the user experience, this schedules core updates for 1 hour, plugin updates for 1.5 hours, and theme updates for 2 hours after installation.

Follow-up to [58128], [58139], [58308], [58309].

Props afragen, hellofromTonya, peterwilsoncc, nithi22, dd32.
Fixes #61457. See #58281, #61391.
Built from https://develop.svn.wordpress.org/trunk@58435


git-svn-id: http://core.svn.wordpress.org/trunk@57884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 14:39:11 +00:00
ellatrix 6e426b04c1 Editor: Update packages for 6.6 Beta 3.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.
See https://github.com/WordPress/gutenberg/pull/62641.
See https://github.com/WordPress/wordpress-develop/pull/6850.

Props ellatrix, cbravobernal.

Fixes #61462.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 13:19:30 +00:00
Sergey Biryukov c469887ea5 Twenty Twenty-Four: Replace theme screenshot to remove drop shadow at the top.
Follow up to [56716], [56726].

Props beafialho.
Fixes #61460.
Built from https://develop.svn.wordpress.org/trunk@58433


git-svn-id: http://core.svn.wordpress.org/trunk@57882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 12:26:12 +00:00
hellofromTonya aaffdcd671 Site Health: Bump the recommended MariaDB version.
MariaDB 10.4 reaches EOL (“End of Life”) on 18 June 2024. The recommended minimum is bumped to 10.5 for now, whose EOL is 24 June 2025.

Also removes the skip in tests to allow the tests to run on all branches with this change.

References:
* [https://mariadb.org/about/#maintenance-policy MySQL Support Policies]
* [https://make.wordpress.org/hosting/handbook/server-environment/#database Hosting team handbook: Server Environment: Database]

Follow-up to [55665], [52420], [53435], [54069], [54076].

Props peterwilsoncc, dd32, costdev, mukesh27, hellofromTonya.
Fixes #61458.
See #meta7679.
Built from https://develop.svn.wordpress.org/trunk@58432


git-svn-id: http://core.svn.wordpress.org/trunk@57881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 11:59:14 +00:00
Pascal Birchler c655ae0a22 Build/Test Tools: install additional languages in end-to-end tests.
As a follow-up to [58430], this makes another locale available during the e2e tests, allowing testing of scenarios that require loading translations in the future.

See #61240.
Built from https://develop.svn.wordpress.org/trunk@58431


git-svn-id: http://core.svn.wordpress.org/trunk@57880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 10:51:13 +00:00
Pascal Birchler ac8ac3941b Build/Test Tools: add new end-to-end tests for edge cases such as maintenance mode.
Sometimes errors only occur in unusual code paths such as the maintenance mode or installation screens. Due to lack of tests for these scenarios in core, such errors are usually only noticed very late. This change adds new end-to-end (e2e) tests to prevent regressions in the following areas:

- Maintenance mode (presence of a `.maintenance` file)
- Fatal error handler (simulated with an mu-plugin that causes an error)
- Installation screen (verifying full installation flow & that there are no database errors)

Thanks to these tests, an issue was already found and addressed in the default `wp_die` handler, as `wp_robots_noindex_embeds` and `wp_robots_noindex_search` used to cause PHP warnings due to `$wp_query` not existing.

In the future, these tests can be extended to also test scenarios like localized error pages via `wp_load_translations_early()`.

Fixes #61240.
Built from https://develop.svn.wordpress.org/trunk@58430


git-svn-id: http://core.svn.wordpress.org/trunk@57879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 08:20:08 +00:00
oandregal 9a8a0b3fcd Do not use init to register block style variations defined via theme.json.
Props oandregal, aaronrobertshaw, joemcgill, ramonopoly, andrewserong, swissspidy.
See #61451.
Fixes #61312.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 07:09:06 +00:00
isabel_brison e820f8cdf9 Editor: Read theme.json files stored in `styles/` folder only once.
Uses `read_json_file` to access cached file if it exists instead of using `wp_json_file_decode` directly.

Props oandregal, aaronrobertshaw, joemcgill, ramonopoly, isabel_brison.
See #61451.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 06:02:14 +00:00
costdev aeb9f37238 Taxonomy: Remove unused `$term_ids` in `wp_set_object_terms()`.
In [5983], a call to `clean_term_cache()` was removed from `wp_set_object_terms()`. Since then, the `$term_ids` array that had been populated inside one of the `foreach` loops before being passed to the removed `clean_term_cache()` call has not been used.

This change removes the unused `$term_ids` variable.

Follow-up to [5983].

Props dlh, mukesh27.
Fixes #61456.
Built from https://develop.svn.wordpress.org/trunk@58427


git-svn-id: http://core.svn.wordpress.org/trunk@57876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-18 04:12:11 +00:00
Sergey Biryukov 1e3f4a7c9f Twenty Seventeen: Correct image height for the Site Logo block.
Includes removing box shadow when the “Link image to home” setting is enabled.

Follow-up to [43800].

Props sabernhardt, nkeller15, karmatosed, hmbashar, rajinsharwar, huzaifaalmesbah, shailu25.
Fixes #58474.
Built from https://develop.svn.wordpress.org/trunk@58426


git-svn-id: http://core.svn.wordpress.org/trunk@57875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 18:31:18 +00:00
hellofromTonya f8b436bb20 Code Modernization: Fix 'ping_sites' non-nullable deprecation.
When saving options from the Settings page, include the `'ping_sites'` option in the allowed "writing" options list only when the `'blog_public'` option is `'1'`.

Fixes a PHP 8.1 and above "null to non-nullable" deprecation notice in `sanitize_option()` ([https://core.trac.wordpress.org/browser/trunk/src/wp-includes/formatting.php?annotate=blame#L4952 which happens when here] as part of [22255]):

{{{
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in .../wp-includes/formatting.php
}}}

**Explanation**

[https://developer.wordpress.org/apis/options/#writing Per the documentation], the `ping_sites` option requires the `'blog_public'` option to have a value of `'1'` and must be a `string` data type. `null` is not valid for this option.

The relationship between the 2 options shows itself in the `options-writing.php` code ([https://core.trac.wordpress.org/browser/tags/6.5.4/src/wp-admin/options-writing.php#L233 shown here] and in [4326]), as the `textarea#ping_sites` only renders when `'1' === get_option( 'blog_public' )`.

**What happens if `'blog_public'` is not `'1'`?**

The `'ping_sites'` option will not be a field on the page. Upon saving:

* HTTP POST (`$_POST`) does not include `'ping_sites'`. 
* Before this commit:
   * The [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/options.php#L333 option's value was set to] `null` before being passed to `update_option()`. 
   * `update_option()` invokes `sanitize_option()`.
   * A `null` value for the `'ping_sites'` case was passed to `explode()`, which threw a deprecation notice on PHP 8.1 and above.
* With this commit, the `'ping_sites'` option is no longer included in the allow list and thus will not be passed to `update_options()` > `sanitize_option()` > `explode()`.

Follow-up to [22255], [12825], [4326], [949].

Props kitchin, SergeyBiryukov, swissspidy, devmuhib, rajinsharwar, hellofromTonya.
Fixes #59818.
Built from https://develop.svn.wordpress.org/trunk@58425


git-svn-id: http://core.svn.wordpress.org/trunk@57874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 18:03:13 +00:00
dmsnell 9c25b9d9b8 KSES: Fix tests and detection of HTML Bogus Comment spans.
In [58418] a test was added without the `test_` prefix in its function
name, and because of that, it wasn't run in the test suite.
The prefix has been added to ensure that it runs.

In the original patch, due to a logical bug, a recursive loop to
transform the inside contents of the bogus comments was never run
more than once. This has been fixed.

This patch also includes one more case where `kses` wasn't
properly detecting the bogus comment state, and adds a test case
to cover this. It limits itself to some but not all constructions
of invalid markup declaration so that it doesn't conflict with
existing behaviors around those and other kinds of invalid comments.

Props ellatrix, dmsnell.
See #61009.
Follow-up to [58418].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 12:04:12 +00:00
oandregal 963175f228 Global Styles: Avoid unnecessary processing of theme.json variation partials.
Props aaronrobertshaw, oandregal, mukesh27.
See #61451.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 10:08:12 +00:00
oandregal c9fa3d2f32 Global styles: prevent duplicate CSS for block style variations.
Props aaronrobertshaw, mukesh27, ramonopoly, isabel_brison, oandregal.
Fixes #61443.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 09:44:10 +00:00
isabel_brison 93177aa249 Editor: fix custom CSS output for block style variations.
Adds custom CSS to the block style variation rules output by `get_styles_for_block` in class `WP_Theme_JSON`.

Props isabel_brison, aaronrobertshaw.
Fixes #61425.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-17 03:49:11 +00:00
Sergey Biryukov ac8829da47 Tests: Use more specific assertions in `WP_Script_Modules` tests.
Follow-up to [57269], [57327], [57593].

See #60705.
Built from https://develop.svn.wordpress.org/trunk@58420


git-svn-id: http://core.svn.wordpress.org/trunk@57869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-16 10:17:10 +00:00
Sergey Biryukov 616c656c96 Docs: Add missing description for a few globals in the admin.
This affects:

* `$post_type`
* `$post_type_object`
* `$taxonomy`
* `$title`
* `$wp_meta_boxes`

Follow-up to [31121], [32642], [32643], [37890], [43815], [44244], [45742], [53060], [53061], [54831].

Props shub07, 1naveengiri, sabernhardt, SergeyBiryukov.
Fixes #59561.
Built from https://develop.svn.wordpress.org/trunk@58419


git-svn-id: http://core.svn.wordpress.org/trunk@57868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-15 12:34:13 +00:00
dmsnell 9ccb882ff0 KSES: Preserve some additional invalid HTML comment syntaxes.
When `wp_kses_split` processes a document it attempts to leave HTML comments
alone. It makes minor adjustments, but leaves the comments in the document in
its output. Unfortunately it only recognizes one kind of HTML comment and
rejects many others.

This patch makes a minor adjustment to the algorithm in `wp_kses_split` to
recognize and preserve an additional kind of HTML comment: closing tags with
an invalid tag name, e.g. `</%dolly>`.

These invalid closing tags must be interpreted as comments by a browser.
This bug fix aligns the implementation of `wp_kses_split()` more closely
with its stated goal of leaving HTML comments as comments.

It doesn't attempt to fully fix the mis-parsed comments, but it does propose a
minor fix that hopefully won't break any existing code or projects.

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

Props ellatrix, dmsnell, joemcgill, jorbin, westonruter, zieladam.
See #61009.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-15 06:33:13 +00:00
antpb b647bc78cd Media: Revert r58415 Use `version_compare()` for Imagick version check when removing alpha.
This commit is a clean revert of r58415 as tests seem to now be failing with this change. Likely the test needs an update as well to accomodate the new successful version check.
Follow-up to [60798].
Props jorbin, hellofromTonya.
See #60798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 15:26:09 +00:00
Joe McGill 3f8fb3f8c1 Options: Fix some default autoload values used in core.
This fixes some autoload values that were updated in [58105] that used the database values of `"on"` and `"off"` instead of the boolean values `true` and `false` when being passed to `add|update_option()`.

Props joemcgill, desrosj, rajinsharwar.
Fixes #61045. See #42441.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 15:21:10 +00:00
antpb b1a46c8708 Media: Use `version_compare()` for Imagick version check when removing alpha.
Previously `remove_pdf_alpha_channel()` used `Imagick::getVersion()` to validate the environment is capable of handling alpha. This was the incorrect function to use to check the module version as it will only provide the ImageMagick API version. This patch adjusts to instead use `phpversion()` as this is the correct method to get the Imagick version needed to determine alpha compatibility. This fixes a number of host tests that have been correctly failing on subsets of environments. Serendipidously, sometimes the API version was high enough to avoid shining light on this problem.

Props swissspidy, joedolson, antpb.
Fixes #60798.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 14:43:08 +00:00
Sergey Biryukov 32b8143208 Docs: Add missing full stop in `WP_Duotone` class method DocBlocks.
Follow-up to [56101].

Props dhruval04.
Fixes #61439.
Built from https://develop.svn.wordpress.org/trunk@58414


git-svn-id: http://core.svn.wordpress.org/trunk@57863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 12:18:11 +00:00
oandregal d2ebe7d776 Section styles: add slug to override non-kebab-cased variations.
Props aaronrobertshaw, oandregal.
Fixes #61440.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 09:05:11 +00:00
oandregal 8e7728a1ad theme-i18n.json: add missing i18n for variations
Props aaronrobertshaw, oandregal.
See #61442

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


git-svn-id: http://core.svn.wordpress.org/trunk@57861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-14 08:35:09 +00:00
Pascal Birchler 80c53d4b8e Quick/Bulk Edit: Further adjust label width for translations. after [58325]
Props zodiac1978.
Fixes #60851.
Built from https://develop.svn.wordpress.org/trunk@58411


git-svn-id: http://core.svn.wordpress.org/trunk@57860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 21:38:12 +00:00
Sergey Biryukov 3aaf7ab71e Twenty Twenty-One: Fix typography settings for the Quote block.
Follow-up to [49216], [49478], [49574], [49633], [49800].

Props poena, jyolsna, deepakvijayan, audrasjb, whaze, ironprogrammer, suascat_wp, sannevndrmeulen, zunaid321, oglekler, sabernhardt, mukesh27, ugyensupport, devmuhib, priyanshii5, nicolefurlan, hellofromTonya, huzaifaalmesbah, shailu25, vivekawsm, imranhasanraaz, karmatosed.
Fixes #55991.
Built from https://develop.svn.wordpress.org/trunk@58410


git-svn-id: http://core.svn.wordpress.org/trunk@57859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 20:55:06 +00:00
hellofromTonya b5ec907fb0 Code Modernization: Use wp_trigger_error() instead of trigger_error().
Replaces `trigger_error()` with `wp_trigger_error()`.

The usage of `wp_trigger_error()` avoids generating `E_USER` family errors unless `WP_DEBUG` is on. In doing so, users should not see these messages in normal production.

Notes:
* Removes `E_USER_NOTICE` when passed as an argumnent, as it's the default error level.
* An empty string is passed for the function name when its name is already in the error message or does not add value to the error message.
* Externally maintained libraries are not included.

Follow-up to [55204], [25956], [29630], [38883], [52062], [52049], [54272], [38883], [55245], [51599], [14452], [38883], [24976].

Props prasadkarmalkar, rajinsharwar, thelovekesh, hellofromTonya, swissspidy. 
Fixes #59652.
Built from https://develop.svn.wordpress.org/trunk@58409


git-svn-id: http://core.svn.wordpress.org/trunk@57858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 20:50:14 +00:00
desrosj 2889f4d90e Coding Standards: Apply changes after running `composer format`.
This applies several formatting related changes made while running `composer format`.

Follow up to [55720], [58171], [58271], [58282], [58283], [58292], [58299], [58303], [58332].
See #51857, #60719, #60895, #61021, #61118, #61228, #61276, #61324.
Built from https://develop.svn.wordpress.org/trunk@58408


git-svn-id: http://core.svn.wordpress.org/trunk@57857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 15:06:07 +00:00
joedolson 4c5baa2f21 Themes: Fix attachment rendered as site logo on attachment page.
Fix issue where the attachment thumbnail would be rendered as the site logo on attachment single templates if no site logo is set. Avoid calling `wp_attachment_is_image()` with no value, since that function will fallback to the global `$post` variable. Follow up to [58213]. See #60922.

Props greenshady, krupajnanda, hmbashar, rajinsharwar, joedolson.
Fixes #61408.
Built from https://develop.svn.wordpress.org/trunk@58407


git-svn-id: http://core.svn.wordpress.org/trunk@57856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 14:48:05 +00:00
desrosj 8b91147c35 Posts/Post Types: Display the correct message when post status is filtered on save.
This prevents the display of an inaccurate message when the `wp_insert_post_data` filter is used to change the status of a post while saving. This bug was only present when using the Classic Editor.

The previous code incorrectly assumed that a filter would never change a post’s status to `draft`, resulting in a “Post published.” message instead of “Post draft updated.”.

Props freibergergarcia, sirzooro, hakre, blepoxp, scribu, kawauso.
Fixes #11207.
Built from https://develop.svn.wordpress.org/trunk@58406


git-svn-id: http://core.svn.wordpress.org/trunk@57855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 14:46:08 +00:00
joedolson 4d68eaaa45 Administration: A11y: Add visible labels in theme UI.
Finish task to replace placeholders used for labels with visible label elements. Add label elements in theme browser and theme installation screen. Change position of search input to match other user interfaces in WordPress.

Also crediting all contributors to ticket #61389, which this also closes.

Props joedolson, rcreators, sabernhardt, balub, rejaulalomkhan, syamraj24, nazmul111, krupajnanda, huzaifaalmesbah, hmbashar, mdnesarmridha, colorful-tones, printsachen1.
Fixes #40331, #61389.
Built from https://develop.svn.wordpress.org/trunk@58405


git-svn-id: http://core.svn.wordpress.org/trunk@57854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:57:10 +00:00
audrasjb c60358fdb2 Bundled block themes: Set `theme.json` schema version to `6.5`.
This changeset updates the `theme.json` schema version from `trunk` which is the development version to the last schema for version 2 available at `https://schemas.wp.org/wp/6.5/theme.json`.

Props poena, sabernhardt, wildworks, mukesh27, kafleg.
Fixes #61342.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:45:09 +00:00
hellofromTonya d71d3ac0fe Plugins: Remove unassigned sprintf in wp_get_plugin_action_button().
Removes an unassigned `sprintf` that was accidentally included as part of [57545] in the `wp_get_plugin_action_button()`. A copy/paste whoopsie.

The actual used code is assigned a wee bit lower in the function within the `install` case.

Follow-up to [57545].

Props hellofromTonya, costdev, rajinsharwar.
Fixes #61420.
Built from https://develop.svn.wordpress.org/trunk@58402


git-svn-id: http://core.svn.wordpress.org/trunk@57851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:27:14 +00:00
Aaron Jorbin 01876b0906 Comments: Expire comment author cookies after 1 year (rather than 0.95129375951 of a year)
This filter was originally added in [19622] which predates the addition of the constant added in [21996] by 24085717 seconds.

Props peterwilsoncc, khokansardar, krupalpanchal.
Fixes #61412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 13:05:13 +00:00
Adam Silverstein bf41fcb7ec Networks and sites: use get_allowed_mime_types to populate multisite’s upload_filetypes.
Ensure new multisite installs are up to date with the current mime types supported in core.

Note that this will only affect newly created networks, since this is only used to populate the schema for new networks, not change the allowed mime types for existing networks

Props spacedmonkey, costdev, pavanpatil1, joemcgill, rajinsharwar, tb1909.
Fixes #53167.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57849 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 10:00:11 +00:00
Tammie Lister f473b7c02b Twenty Fourteen: Fixes table block not having same design in editors.
The table block did not have the same design in the editor for front and back. This resolves the issue for the front end editor.

Props pranitdugad, nidjidhandhukiya, poena, shailu25, hmbashar, ugyensupport.
Fixes #60293.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 09:53:12 +00:00
audrasjb 77184c1516 HTML API: Revert using regex in block bindings HTML replacement logic.
This changeset reverts part of the changes made in [58298] to avoid using regex that can cause potential bugs. It is indeed safer to revert these changes for now and do the refactoring once the HTML API supports CSS selectors and provides a way to set inner content.

It also adds a unit test to cover the regression experienced in https://github.com/WordPress/gutenberg/issues/62347.

Follow-up to [58298].

Props santosguillamot, gziolo.
Fixes #61385.
See #61351.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-13 08:57:15 +00:00
Peter Wilson 25c4ce9479 Docs: Correct typos in JavaScript wordmark.
Fixes documentation and comment references to capitalize JavaScript in accordance with the wordmark.

Props peterwilsoncc, mukesh27, dmsnell.
See #60699.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 23:12:13 +00:00
hellofromTonya 4cbe355f0b Plugins: Ensure wp_get_plugin_action_button() returns a string.
[57545] introduced `wp_get_plugin_action_button()`. This function is documented to return a `string`. However, if the user does not have the appropriate capabilities, it returned `void`, which is unexpected.

Resolves the issue by moving the `return $button` to the bottom of the function to ensure it always returns a `string` type. On success, the button's HTML string is returned; else, an empty string is returned.

Unit tests are included.

Follow-up to [57545].

Props costdev, rajinsharwar, hellofromTonya.
Fixes #61400.
Built from https://develop.svn.wordpress.org/trunk@58396


git-svn-id: http://core.svn.wordpress.org/trunk@57845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 18:17:13 +00:00
Sergey Biryukov bd77cc433d Docs: Correct alignment in `WP_Block_Bindings_Registry::register()` DocBlock.
Follow-up to [57373], [57375], [57641].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 12:44:13 +00:00
oandregal 24a4ef96be Editor: register block style variations defined by the theme using the init action.
Props oandregal, aaronrobertshaw, annezazu.

Follow-up to [58264].
See #61312.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 07:17:12 +00:00
isabel_brison d20c68f9df Editor: Fix specificity of core block style variations.
Adds styles for default block style variations to core `theme.json` so they can override core element styles where needed.

Props aaronrobertshaw, isabel_brison.
Follows r58241.
See #61165.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-12 06:11:13 +00:00
audrasjb 797fa55a03 Post WordPress 6.6 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@58392


git-svn-id: http://core.svn.wordpress.org/trunk@57841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 16:24:14 +00:00
audrasjb 9d792b2342 WordPress 6.6 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@58391


git-svn-id: http://core.svn.wordpress.org/trunk@57840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 16:10:17 +00:00
audrasjb bbb2beb7f7 Docs: Fix improper docblock format in `lang_dir_for_domain` hook.
Follow-up to [58236].

Props khokansardar.
See #60699.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 14:27:18 +00:00
Sergey Biryukov 6e3516b1b6 Administration: Remove redundant type casting in `WP_List_Table::search_box()`.
Scalar values passed to `esc_attr()` are already converted internally to a string via both `wp_check_invalid_utf8()` and `_wp_specialchars()`.

Includes adding `@covers` tags for unit tests.

Follow-up to [58379].

See #58379.
Built from https://develop.svn.wordpress.org/trunk@58389


git-svn-id: http://core.svn.wordpress.org/trunk@57838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 12:38:14 +00:00
Sergey Biryukov 0ed09d9b4b Docs: Further improve the `wp_http_validate_url()` DocBlock.
Follow-up to [58384].

See #61092.
Built from https://develop.svn.wordpress.org/trunk@58388


git-svn-id: http://core.svn.wordpress.org/trunk@57837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 12:06:16 +00:00
ellatrix 47e24c6791 Editor: Update npm packages for WP 6.6 Beta 2.
See https://github.com/WordPress/wordpress-develop/pull/6773.

Fixes #61410.

Props vcanales.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 10:07:32 +00:00
audrasjb 69eb380d78 Docs: Remove unwanted whitespace found in `wp-includes/http.php`.
Follow-up to [58384].

Unprops audrasjb.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 07:29:12 +00:00
audrasjb 074a64328e Docs: Various docblock improvements in HTTP Request API, as per WP docs standards.
See #60699.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57834 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 07:14:13 +00:00
audrasjb 9d29f2263a Docs: Improve `wp_remote_safe_*` and `wp_http_validate_url` docblocks.
Props benjaminpick, audrasjb.
Fixes #61092.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 07:09:09 +00:00
audrasjb 8faf5b618a Login and Registration: Make the `wp-login.php` form padding more consistent.
This changeset removes the extra `padding-bottom` to the login form located in `wp-login.php`.

Props deeppatel8950, meetmehta1205, audrasjb, webcommsat, dhrumilk.
Fixes #61013.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 06:41:13 +00:00
audrasjb 20630accce Login and Registration: Add `required` attribute to username and password fields in `wp_login_form()`.
These attributes are needed to indicate that both fields are required. This changeset doesn't add the attribute by default but allows extenders to enable it by passing `true` to the `$required_username` and `$required_password` to `wp_login_form()` arguments array.

Props alesflex, sabernhardt, joedolson, rcreators, rajinsharwar.
Fixes #60062.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 06:24:18 +00:00
Peter Wilson 41e21c4ecf Options, Meta APIs: Lower priority of default autoload threshold filter.
Lowers the priority at which `wp_filter_default_autoload_value_via_option_size()` is registered to run on the `wp_default_autoload_value()` filter. The default filter now runs at priority 5.

This is to allow third party developers to modify whether an option is autoloaded using the default priority, 10, rather than require they register their code to run at a higher priority.

Follow up to [57920].

Props peterwilsoncc, joemcgill.
Fixes #42441.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 02:40:14 +00:00
Peter Wilson bb95e4fe9e Options, Meta APIs: Add SQL escaping to query loading 'all options'.
Escapes the return value of `wp_autoload_values_to_autoload()` for use in the database query loading 'all options'. This is a hardening fix to protect against future changes to the options API which may allow developers to further customize the return value of the `wp_autoload_values_to_autoload` filter.

Follow up to [57920].

Props peterwilsoncc, joemcgill.
Fixes #42441.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 02:31:13 +00:00
Peter Wilson fb00a36d1f Administration: Prevent an orderby array throwing a notice.
Prevent `WP_List_Table::search_box()` from throwing an array to string conversion notice when post list tables are loaded with an array of orderby parameters in the URL, eg: `/wp-admin/edit.php?post_type=page&orderby[menu_order]=ASC&orderby[title]=ASC`.

Follow up to [29027].

Props leonidasmilossis, rajinsharwar, swissspidy, NomNom99, pls78, SergeyBiryukov.
Fixes #59494.
See #17065.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 02:14:16 +00:00
isabel_brison 9fbefbd9f0 Editor: Improve maintainability of `class WP_Theme_JSON` tests.
Updates tests calling `get_stylesheet` to not output layout styles if they’re not relevant to the test or to call `get_styles_for_block` instead where more appropriate.

Props isabel_brison, andrewserong, ramonopoly.
Fixes #61371.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-11 00:31:10 +00:00
Peter Wilson 27bdc71f33 Editor: Add labels for template name display in site editor.
Add the label `template_name` to post types and taxonomies for use by the site editor to display on the templates/add new template screens to allow extenders to customize the display.

For post types the template name applies to templates for a singular pages with the default value "Single item: [singular name]".

For taxonomies the template name applies to templates for term archives with the default value "[singular name] Archives".

Props aljullu, audrasjb, ntsekouras, ellatrix, oglekler, rajinsharwar.
Fixes #60881.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 23:22:12 +00:00
audrasjb ea70d42705 Customize: Avoid loading the `widgets` component if a block theme is activated.
This changeset adds a check to ensure the current theme is not a block theme before adding the `widgets` component to the Customizer manager. This avoids a PHP warning when previewing/customizing notification emails with a block theme in BuddyPress and potentially on other plugins.

See https://github.com/buddypress/buddypress/pull/215.

Props imath, mukesh27, faisal03, sumitbagthariya16, webcommsat.
Fixes #60236.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 22:12:17 +00:00
audrasjb 5a9b7f8c62 Quick/Bulk Edit: Remove the `iedit` class from the row selector in `common.js`.
This changeset fixes an issue where the "Bulk select" option was getting selected when only a single user, comment, media, or plugin was selected.

Follow-up to [57745].

Props haritpanchal, swissspidy, sabernhardt, faisal03, sumitbagthariya16, mohitdadhich10.
Fixes #61168.




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


git-svn-id: http://core.svn.wordpress.org/trunk@57824 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 21:52:15 +00:00
Sergey Biryukov 139c2aaf45 Coding Standards: Use strict comparison in `wp-admin/includes/class-wp-list-table.php`.
Follow-up to [3724], [5575], [15642], [17202].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@58374


git-svn-id: http://core.svn.wordpress.org/trunk@57823 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-10 16:47:18 +00:00
Sergey Biryukov 2aadbaa814 Docs: Correct DocBlock formatting for `activate_tinymce_for_media_description`.
Follow-up to [58372].

See #60158.
Built from https://develop.svn.wordpress.org/trunk@58373


git-svn-id: http://core.svn.wordpress.org/trunk@57822 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 22:53:14 +00:00
joedolson b9cd68854f Media: Accessibility: Add filter for TinyMCE in media descriptions.
Add a filter to enable TinyMCE in the media description textarea on the attachment details screen.

The media description field may be used to provide extended descriptions of images and videos, such as a transcript or detailed graphic explanations. In these uses, it will generally require structural elements like paragraphs. Having the ability to enable TinyMCE makes it easier for users to add this content without HTML knowledge.

Props juliemoynat, sebastienserre, mukesh27, joedolson.
Fixes #60158.
Built from https://develop.svn.wordpress.org/trunk@58372


git-svn-id: http://core.svn.wordpress.org/trunk@57821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 14:32:14 +00:00
Tammie Lister 335e911d59 Twenty Fifteen: Fixes patch miss [58370].
The latest patch was missing so one inherit wasn't added. Removes unused line.

Props @shailu25.
See #59802.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57820 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 14:25:12 +00:00
Tammie Lister 16dc8addd7 Twenty Fifteen: Fixes patch miss [58368].
The latest patch was missing so one inherit wasn't added. Bringing that in with this commit.

Props @shailu25.
See #59802.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57819 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 10:36:11 +00:00
Tammie Lister 1a551128b4 Twenty Fourteen: Fixes missing search block border.
The search block border was missing inside the wrapper on the front. This was done by adding styles to the theme block styles file along with padding.

Props nidhidhandhukiya, sabernhardt, yurajsinh2211, kamran8176, imranhasanraaz, krupajnanda, harshgajipara, rejaulalomkhan, shailu25, hmbashar, rajinsharwar.
Fixes #60164.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57818 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 09:52:11 +00:00
Tammie Lister b686f90dbb Twenty Fifteen: Fixes quote text color not changing with block setting.
The quote block citation text color wasn't changing through block settings. This resolves by using inherit.

Props viralsampat, poena, sabernhardt, shailu25, krupajnanda, hmbashar, rajinsharwar.
Fixes #59802.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57817 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 09:42:09 +00:00
Tammie Lister 05613ca164 Twenty Seventeen: Fixes space between latest comments blocks as typography size is increased.
The latest comments block space between comments not increases based on typography size. This only impacts the margin if added within a post, widgets on the front-end still only have a 1em margin which is smaller yet variable.

Props pitamdey, sabernhardt, shailu25, harshgajipara, rajinsharwar.
Fixes #59130.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-09 09:34:14 +00:00
Sergey Biryukov f614aaef48 Coding Standards: Use strict comparison in `wp-includes/theme.php`.
Follow-up to [12025], [14850], [15641], [20029], [22436], [35738], [36915], [58213].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@58366


git-svn-id: http://core.svn.wordpress.org/trunk@57815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-08 16:23:12 +00:00
dmsnell 8683a502a0 HTML API: Call `$this->is_tag_closer()` in HTML Processor.
The HTML Processor had been calling the parent class `is_tag_closer()`
method, but since visiting virtual nodes was introduced, it's important
that all of the methods are called on the subclass.

This patch fixes one issue identified where the parent method was called
instead, and it fixes another case where the change from calling the
parent method to the `$this` method was done improperly.

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

Props jonsurrell.
See #61348.
Follow-up to [58304].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-08 12:12:08 +00:00
dmsnell cf2a88a397 HTML API: Fix three small type-related bugs.
This applies three fixes that appeared as part of
adding type annotations to the HTML API.

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

Props jonsurrell.
See #61399.
Follow-up to [55203], [56274].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-08 11:12:11 +00:00
dmsnell 4b8fa1bc8b HTML API: Return subclass from `::create_fragment`
When the `WP_HTML_Processor` was introduced with its `::create_fragment()`
static creator method, that method has been returning a `new self(...)`.
Unfortunately, this means that subclasses cannot use that method since it
will return the `WP_HTML_Processor` instead of the subclass.

With this patch, the static creator method returns `new static(...)` to preserve
the intended behavior. A new test asserts this behavior for future changes.

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

Props dmsnell, jonsurrell.
Follow-up to [56274].
Fixes #61374.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-08 10:57:14 +00:00
Peter Wilson 2840648d86 Embeds: Remove SlideShare embed block variation.
The oEmbed endpoint for SlideShare is effectively deprecated and throws an error for the majority of slide-decks using the service.

Capitalize the name of the service in the deprecation notice in accordance with the wordmark.

Props peterwilsoncc, mukesh27, swissspidy, talldanwp, dd32.
Fixes #61349.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-07 23:15:16 +00:00
Weston Ruter 7529944c8d General: Fix array format for allowed HTML passed into wp_kses() for wp_trigger_error().
Kses requires an associative array of allowed HTML.

See #57686. Follow-up to [56707].

Props thelovekesh, westonruter.
Fixes #61318.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-07 16:50:15 +00:00
Sergey Biryukov f6e876199a Coding Standards: Use strict comparison in `wp-admin/includes/post.php`.
Follow-up to [2718], [7103], [7338], [8857], [9036], [9103], [11807], [11908], [15315], [16901], [17078], [23725], [23735], [44141], [45583].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.
Built from https://develop.svn.wordpress.org/trunk@58360


git-svn-id: http://core.svn.wordpress.org/trunk@57809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-07 12:29:15 +00:00
Sergey Biryukov a902954f81 Docs: Correct DocBlock formatting for `apply_block_hooks_to_content()`.
Follow-up to [58291], [58355].

Props khokansardar.
Fixes #61392.
Built from https://develop.svn.wordpress.org/trunk@58356


git-svn-id: http://core.svn.wordpress.org/trunk@57808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-06 14:36:12 +00:00
Sergey Biryukov e51e787656 Docs: Correct DocBlock and comment formatting in `wp-includes/blocks.php`.
Follow-up to [58291], [58292].

Props david.binda.
Fixes #61390.
Built from https://develop.svn.wordpress.org/trunk@58355


git-svn-id: http://core.svn.wordpress.org/trunk@57807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-06 12:38:12 +00:00
oandregal 43dd91cdc6 Editor: code quality improvements for theme.json migrate API
Backports https://github.com/WordPress/gutenberg/pull/62305

Follow-up to [58328], #61282.

Props ajlende, oandregal, ramonopoly, mukesh27.
Fixes #61282.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-06 08:02:16 +00:00
Peter Wilson 3b8d75611b Editor (Font Library): Store font subdirectory in post meta.
Stores the font file sub-directory in the `wp_font_face` post meta. Similar to attachments, only the portion of the path relative to the base directory is stored.

This ensures the files can be deleted alongside their post on sites using a plugin to store font files in sub-directories. Previously running such a plugin would result in the files remaining on the file system post delete.

Props costdev, grantmkin, peterwilsoncc.
Fixes #61297.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 23:19:17 +00:00
joedolson c844f3203b Media: Prevent shifting on details update in media modal.
Fix issue where the image details would shift position during AJAX updates in the media modal. Occurred when the Attachment Details heading was translated into a language where the text no longer alowed space for the 'Saved' message to the right of the message.

Props pavelevap, SergeyBiryukov, antpb, joedolson, shailu25.
Fixes #27914.
Built from https://develop.svn.wordpress.org/trunk@58352


git-svn-id: http://core.svn.wordpress.org/trunk@57804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 19:57:13 +00:00
desrosj ab1bc73088 Build/Test Tools: Make OS detection more generic in job names.
This prevents workflow runs in older branches that are using older versions of runner images from displaying the wrong operating system in job names.

Because the updated files are reusable, this change will automatically fix the issue in all older branches without the need to backport.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 19:29:17 +00:00
desrosj 9746093d4f Build/Test Tools: Simplify inputs for build process testing.
This introduces a new input to separate the ability to save the built WordPress ZIP from generating the artifacts necessary for comments with Playground testing details.

The ZIP file is used by the performance testing workflow for performing comparisons, so it should be built and saved for every `push` event. The Playground related steps should only run on `pull_request`.

Follow up to [58274].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 18:25:17 +00:00
Sergey Biryukov 11d6ed3dc8 Login and Registration: Declare globals at the top of `wp_signon()` for consistency.
Follow-up to [10437], [32637], [58333].

See #58901.
Built from https://develop.svn.wordpress.org/trunk@58341


git-svn-id: http://core.svn.wordpress.org/trunk@57797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 12:23:10 +00:00
oandregal 4957cdaa0e REST API: improve code quality for class_list field fixtures.
Follow-up to [58326], #61360.

Props antonvlasenko, oandregal.
Fixes #61369.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 11:55:16 +00:00
oandregal 2b50b6ab1d Editor: improve code quality of theme.json classes.
Follow-up to [58328], #61282.

Props ajlende, ramonopoly.
Fixes #61370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-05 08:13:15 +00:00
Joe McGill 9200aad73c Site Health: Ensure each alloptions value is serialized.
This adds additional hardening to the Autoload options Health Check to avoid potential bugs when extenders return unserialzed values from `wp_load_alloptions()`.

Follow-up to [58332].

Props mukesh27, joemcgill, westonruter.
Fixes #61276.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 19:34:16 +00:00
audrasjb 147dc0623c Post WordPress 6.6 Beta 1 version bump.
Built from https://develop.svn.wordpress.org/trunk@58337


git-svn-id: http://core.svn.wordpress.org/trunk@57793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 16:54:07 +00:00
audrasjb 193fb0c9e2 WordPress 6.6 Beta 1.
Built from https://develop.svn.wordpress.org/trunk@58336


git-svn-id: http://core.svn.wordpress.org/trunk@57792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 16:38:12 +00:00
Sergey Biryukov 4c61d32c3c Comments: Ensure the correct comment ID type is passed to `get_comment_author`.
The `$comment_id` parameter of the `get_comment_author` filter is documented as a numeric string, however in case a non-existing comment ID is passed to the `get_comment_author()` function, it could be an integer instead.

This commit resolves the issue and adds a PHPUnit test demonstrating the behavior.

Includes updating `get_comment_author_url()` unit tests for consistency.

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

Props david.binda.
Fixes #60475.
Built from https://develop.svn.wordpress.org/trunk@58335


git-svn-id: http://core.svn.wordpress.org/trunk@57791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 15:29:13 +00:00
Joe McGill 1c4a732f5f Editor: Cache global styles for blocks.
This caches the generated CSS from block nodes in merged Theme JSON data to avoid repeated costly operations required to compute style properties for blocks. The generated CSS is saved to a transient that expires every hour.

Props thekt12, spacedmonkey, pereirinha, mukesh27, isabel_brison, oandregal, andrewserong, ramonjd.
Fixes #59595.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 14:52:13 +00:00
audrasjb 5d6ac060ba Login and Registration: Flush `user_activation_key` after successfully login.
This changeset ensures the `user_activation_key` is flushed after successful login, so reset password links can not be used anymore after the user successfully log into their dashboard.

Props nsinelnikov, rajinsharwar, Rahmohn, oglekler, hellofromTonya.
Fixes #58901.
See #32429



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


git-svn-id: http://core.svn.wordpress.org/trunk@57789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 14:44:16 +00:00
Joe McGill b61bce3b08 Site Health: Add test for large autoloaded options.
This adds a new Site Health check that will alert site owners if they are autoloading a large amount of data from the options table, as it could result in poor performance. The issue will be shown if the size of autoloaded options is greater than 800 KB, which can be adjusted using the new `site_status_autoloaded_options_size_limit` filter.

Props mukesh27, joemcgill, rajinsharwar, costdev, audrasjb, krupajnanda, pooja1210, Ankit K Gupta, johnbillion, oglekler.
Fixes #61276.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 14:09:16 +00:00
desrosj 53f25b6015 Build/Test Tools: Add an input to allow errors for the PHPUnit workflow.
This allows a calling workflow to configure the PHPUnit workflow to `continue-on-error` when one occurs. This is useful for older branches where support for a specific version of PHP was not at 100% within the test suite.

Follow up to [58165], [58269], [58270], [58329].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 13:51:13 +00:00
desrosj 96ab8a47b7 Build/Test Tools: Add a PHP version input for E2E workflow.
This allows a specific version of PHP to be used when calling the reusable end-to-end testing workflow, which is particularly useful in older branches.

Follow up to [58165], [58269], [58270].

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


git-svn-id: http://core.svn.wordpress.org/trunk@57786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 12:46:14 +00:00
ellatrix 5b9f383603 Editor: Add theme.json v3 migrations.
See https://github.com/WordPress/wordpress-develop/pull/6616.
See also the original Gutenberg PRs:
* https://github.com/WordPress/gutenberg/pull/58409
* https://github.com/WordPress/gutenberg/pull/61328
* https://github.com/WordPress/gutenberg/pull/61842
* https://github.com/WordPress/gutenberg/pull/62199
* https://github.com/WordPress/gutenberg/pull/62252

Fixes #61282.

Props ajlende, talldanwp, ramonopoly, ellatrix.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 11:55:14 +00:00
gziolo 70d2443a48 Interactivity API: Directives cannot derive state on the server
The Interactivity API has a concept of "derived state" but it only worked on the client (JavaScript). This is the implementation that mirrors it, so derived state has good server-side solution.

Props jonsurrell, darerodz, gziolo, luisherranz, cbravobernal.
Fixes #61037.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 11:01:16 +00:00
ellatrix 10642d626d REST API: Add post class list field.
See https://github.com/WordPress/gutenberg/pull/60642.
See https://github.com/WordPress/wordpress-develop/pull/6716.

Fixes #61360.

Props antonvlasenko, timothyblynjacobs, ellatrix, oandregal.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 10:23:15 +00:00
Pascal Birchler 387a7a8ffd Quick/Bulk Edit: Adjust label width to accommodate longer translations.
Specifically handles `de_*` locales.

Previously: [33598] / #33212.

Props zodiac1978, oglekler.
Fixes #60851.
Built from https://develop.svn.wordpress.org/trunk@58325


git-svn-id: http://core.svn.wordpress.org/trunk@57782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 09:13:08 +00:00
ellatrix c0f933f7d6 Editor: add missing test template file.
Add a missing file for r58323.

See https://github.com/WordPress/wordpress-develop/pull/6468.
See #61110.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 08:51:10 +00:00
ellatrix 4e28fde39a Editor: Fix block template files query for a post-type.
See https://github.com/WordPress/gutenberg/pull/61244.
See https://github.com/WordPress/wordpress-develop/pull/6468.

Fixes #61110.

Props mamaduka, mukesh27, grantmkin, vcanales, ellatrix, oandregal.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 08:14:18 +00:00
gziolo 6635e1b9f3 Editor: Remove unnecessary code for ensuring interactivity API dependency in block core functions
Removing old code for registering the private version of the Interactivity API pre-6.5.

Props czapla, gziolo, shailu25, cbravobernal.
Fixes #60913.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57779 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 07:39:10 +00:00
gziolo e978cba1e5 Interactivity API: Print debug warning when server directives processing encounters errors
Aims to improve the developer experience of the Interactivity API server directives processing.

Props cbravobernal, jonsurrell, westonruter, darerodz, czapla, gziolo.
Fixes #61044.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 07:18:17 +00:00
gziolo d2a459572e Interactivity API: Some property access does not work well in server directives
Ensures property access in PHP works for object properties or associative array values correctly when processing Interactivity API directives.

Props narenin, cbravobernal, jonsurrell, gziolo, czapla.
Fixes #61039.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 06:58:15 +00:00
audrasjb 75f3babe49 Upgrade/Install: Remove the download authenticity message from Core/Plugins/Themes updates.
This changeset deactivates the download authenticity message by disabling package signature verification, at least until software signing is fully implemented on wordpress.org. The provided message had no actionability and only led to more support.

Props jipmoors, afercia, bridgetwillard, s0what, rajinsharwar, audrasjb, johnbillion, peterwilsoncc.
Fixes #47315.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 06:30:16 +00:00
isabel_brison 8f5e7de953 Remove trailing whitespace from `test_wp_apply_shadow_support`.
Follows r58315.
See #60784.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 05:55:11 +00:00
audrasjb 8810038062 Docs: Fix docblock alignment in `class-wp-duotone.php`.
Follow-up to [58313].

Props mukesh27.
See #61271, #60699.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 05:52:10 +00:00
isabel_brison f10a3f1adb Remove extra whitespace from `restore_image_outer_container` docblock.
Props mukesh27.
Follows r58313.
See #61271.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 05:50:10 +00:00
isabel_brison 9bd6463cb0 Add ticket reference to `test_wp_apply_shadow_support`.
Props mukesh27.
Follows r58312.
See #60784.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 05:43:09 +00:00
ellatrix 12bc7a8bcd Editor: add textAlign block support.
See https://github.com/WordPress/gutenberg/pull/59531.
See https://github.com/WordPress/gutenberg/pull/61182.
See https://github.com/WordPress/gutenberg/pull/61717.
See https://github.com/WordPress/wordpress-develop/pull/6590.

Fixes #61256.

Props wildworks, ellatrix.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 05:36:20 +00:00
isabel_brison d546ce74ab Editor: fix duotone filter for aligned images on classic themes.
Adds a filter to move the duotone classname to the outer wrapper on aligned images.

Props scruffian, isabel_brison, ajlende.
Fixes #61271.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-04 01:48:17 +00:00
isabel_brison 357904a871 Editor: Add `__experimentalSkipSerialization` support to shadow.
Checks if `__experimentalSkipSerialization` is set and returns early from `wp_apply_shadow_support` if so.

Props colind, madhudollu, aaronrobertshaw, vcanales, isabel_brison, swissspidy, youknowriad.
Fixes #60784.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 23:36:14 +00:00
audrasjb ecb977b5e2 Editor: Style Engine - continue `get_classnames` loop after adding the default classname.
The `WP_Style_Engine` class has a method `get_classnames` that builds classnames. It loops over an array to add each classname. This changeset adds a `continue` in the loop after adding the default classname.

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

Props ramonopoly.
Fixes #60847.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 22:04:13 +00:00
audrasjb e562f6b12d Site Health: Add a `wp_is_writable()` for fonts directory.
This changeset adds a check in Site Health to display whether the fonts directory is writable or not.

Follow-up to [58299].

Props ironprogrammer.
Fixes #60719.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:57:07 +00:00
costdev ab5693f9f0 Upgrade/Install: Make `$is_debug` consistent in `WP_Automatic_Updater`.
[58139] introduced debugging flags to ensure debugging output would only be shown when both the `WP_DEBUG` and `WP_DEBUG_LOG` constants are defined as true. However, some of the flags incorrectly use `WP_DEBUG_DISPLAY` rather than `WP_DEBUG_LOG`.

This fixes the flags to consistently use `WP_DEBUG` and `WP_DEBUG_LOG` as intended.

Follow-up to [58128], [58139].

Props rogermedia, afragen, swissspidy, costdev.
Fixes #58281.
Built from https://develop.svn.wordpress.org/trunk@58309


git-svn-id: http://core.svn.wordpress.org/trunk@57766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:39:08 +00:00
costdev 1f87d6b717 Upgrade/Install: Don't toggle maintenance mode on translation updates.
The Rollback Auto-Update feature introduced additional maintenance mode toggling.

After installing WordPress in a non-English (US) language, translation updates are performed automatically. As there may be a large number of updates for Core and bundled themes, users will be presented with a maintenance notice upon visiting the newly installed website.

To avoid concerning users that the website has failed to install correctly, this excludes translation updates from triggering the additional maintenance mode toggling.

Follow-up to [58128].

Props benniledl, afragen, rajinsharwar, costdev.
Fixes #61260. See #58281.
Built from https://develop.svn.wordpress.org/trunk@58308


git-svn-id: http://core.svn.wordpress.org/trunk@57765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:25:10 +00:00
costdev 8c6a8e0b79 Site Health: Add translator comment to explain Directories and Sizes.
This adds a translator comment to the Site Health's debug data to describe what "Directories and Sizes" refers to.

References:
- [https://make.wordpress.org/polyglots/handbook/translating/glotpress-translate-wordpress-org/types-of-messages/#strings-with-description Polyglots handbook: Strings with description]
- [https://codex.wordpress.org/I18n_for_WordPress_Developers#Descriptions I18N Codex: Descriptions]

Props oglekler, afragen, amitraj2203.
Fixes #61316.
Built from https://develop.svn.wordpress.org/trunk@58307


git-svn-id: http://core.svn.wordpress.org/trunk@57764 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 21:07:13 +00:00
joedolson fb7ad212ca Menus: Accessibility: Improve screen reader text for edit button.
Change the edit menu item toggle to communicate more context about the item to be edited. Make edit text consistent between Customizer menu editor and admin menu editor.

The menu position is conveyed only visually, using indentation, because there are no organizational semantics in either editor. This change helps provide screen reader users with consistent contextual information about the order, position, and parent of the current item.

Props joedolson, rcreators, afercia, mohonchandra.
Fixes #60673, See #60672.
Built from https://develop.svn.wordpress.org/trunk@58306


git-svn-id: http://core.svn.wordpress.org/trunk@57763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 20:35:13 +00:00
Adam Silverstein 5e65c40921 Media: improve GD support detection for AVIF.
Fix an issue where the GD image library falsely reports supporting the AVIF format, when support is actually missing. Add an additional function check to ensure AVIF support is really available.
Props niktat, adamsilverstein.
Fixes #60910


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


git-svn-id: http://core.svn.wordpress.org/trunk@57762 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 20:27:12 +00:00
dmsnell 2107b186fe HTML API: Report real and virtual nodes in the HTML Processor.
HTML is a kind of short-hand for a DOM structure. This means that there are
many cases in HTML where an element's opening tag or closing tag is missing (or
both). This is because many of the parsing rules imply creating elements in the
DOM which may not exist in the text of the HTML.

The HTML Processor, being the higher-level counterpart to the Tag Processor, is
already aware of these nodes, but since it's inception has not paused on them
when scanning through a document. Instead, these are visible when pausing on a
child of such an element, but otherwise not seen.

In this patch the HTML Processor starts exposing those implicitly-created nodes,
including opening tags, and closing tags, that aren't foudn in the text content
of the HTML input document.

Previously, the sequence of matched tokens when scanning with 
`WP_HTML_Processor::next_token()` would depend on how the HTML document was written,
but with this patch, all semantically equal HTML documents will parse and scan in
the same exact manner, presenting an idealized or "perfect" view of the document
the same way as would occur when traversing a DOM in a browser.

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

Props audrasjb, dmsnell, gziolo, jonsurrell.
Fixes #61348.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 19:47:15 +00:00
ellatrix db68e46662 Editor: resolve patterns server side.
See https://github.com/WordPress/gutenberg/pull/60349.
See https://github.com/WordPress/gutenberg/pull/61757.
See https://github.com/WordPress/wordpress-develop/pull/6673.

Fixes #61228.

Props ellatrix, antonvlasenko.


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


git-svn-id: http://core.svn.wordpress.org/trunk@57760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 18:32:14 +00:00
audrasjb c6d62b17e1 Site Health: Add fonts upload location to Site Health report.
Just like Site Health lists the paths to the plugins/themes/uploads directories, this changeset adds the path to the fonts directory (and its size).

Props swissspidy, andr3ribeiro, krupajnanda, ironprogrammer, iamfarhan09, naeemhaque, imasikur22, tofajjal02, sarkarripon, prottoysarkar, zunaid321, imranhasanraaz, rajinsharwar, nazmul111, audrasjb, peterwilsoncc.
Fixes #60719.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57759 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 16:56:16 +00:00
audrasjb aa44628997 Editor: Simplify the block bindings HTML replacement logic until the HTML API is ready.
This changeset modifies the block bindings HTML replacement logic to use a hardcoded list of selectors based on the block and a regex to substitute the inner content. The previous logic was too complex because the HTML API does not support CSS selectors yet and it does not have an official way to modify the inner HTML. This made it difficult to understand, iterate on it and add new functionalities.
As it will be solved in the future once the HTML API is ready, it is better for now to keep a simple hardcoded version that is easier to understand and iterate on.

Props santosguillamot, gziolo, petitphp.
Fixes #61351.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 16:13:12 +00:00
Sergey Biryukov 6a5c55341c Docs: Correct description for `wp_admin_bar_edit_site_menu()`.
Follow-up to [58035], [58296].

See #60977.
Built from https://develop.svn.wordpress.org/trunk@58297


git-svn-id: http://core.svn.wordpress.org/trunk@57757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 15:44:10 +00:00
audrasjb 5d319f00ac Toolbar: Restore "Edit site" on block editor admin bar link and replace multisite link.
This changeset restores "Edit site" on the block editor link and replaces the multisite link with "Manage Site".

Follow-up to [58035].

Props annezazu, johnbillion, Joen, audrasjb, johnjamesjacoby, oglekler, nilovelez, tobifjellner, sabernhardt, pavanpatil1, hitendra-chopda.
Fixes #60977.



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


git-svn-id: http://core.svn.wordpress.org/trunk@57756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 15:34:13 +00:00
Joe McGill de81cb4175 Build/Test Tools: Reduce cross-pollution in `Tests_Theme_WpAddGlobalStylesForBlocks`.
This ensures cached Theme JSON data is cleared between all test classes that extend `WP_Theme_UnitTestCase` and fixes a few tests that would fail in isolation, even though they full test suite would pass.

Props isabel_brison, thekt12, joemcgill.
Fixes #61337.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 15:05:14 +00:00
dmsnell 5af7587e2b KSES: Allow leading trailing double hyphen in data attributes
Expand allowable set of custom data attribute names to include those containing
leading, trailing, and double `-` characters. Previously, WordPress was
removing data attributes that are used in the Interactivity API. By allowing
these additional custom data attributes, the related Interactivity API
directives will preserve through `kses`.

For example, the Interactivity API frequently relies on custom data attributes
such as `data-wp-on--click="..."`. The change in [43981] would strip these out
of the processed HTML, however.

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

Props cbravobernal, dmsnell, gziolo, jonsurrell.
Follow-up to [43981].
Fixes #61052.

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


git-svn-id: http://core.svn.wordpress.org/trunk@57754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 13:26:09 +00:00
Sergey Biryukov fe3ad93303 Twenty Twenty-One: Only add the sub-menu toggle button to the primary menu.
Follow-up to [49216].

Props domainsupport, mukesh27, poena, karmatosed, shailu25, SergeyBiryukov.
Fixes #52694.
Built from https://develop.svn.wordpress.org/trunk@58293


git-svn-id: http://core.svn.wordpress.org/trunk@57753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 12:51:12 +00:00
Bernhard Reiter cdbb9bf2b4 Block Hooks: Move Posts controller hooked blocks injection logic.
In a similar vein as [58291], this changeset introduces a new `insert_hooked_blocks_into_rest_response` function and hooks it to the `rest_prepare_wp_navigation` filter.

This is part of an ongoing effort to move Block Hooks related code out of the Navigation block. Specifically, `insert_hooked_blocks_into_rest_response` is based on `block_core_navigation_insert_hooked_blocks_into_rest_response`. Eventually, it will be possible to deprecate the latter.

Follow-up to [58291].

See #60759.
Built from https://develop.svn.wordpress.org/trunk@58292


git-svn-id: http://core.svn.wordpress.org/trunk@57752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 12:37:14 +00:00
Bernhard Reiter b62b7a599e Block Hooks: Move ignoredHookedBlocks metadata injection logic.
As of [57790], the Templates endpoint uses the `rest_pre_insert_*` filter to inject the `ignoredHookedBlocks` metadata attribute into anchor blocks, prior to persisting a template or template part to the database. The same principle was implemented for the Navigation endpoint (where additionally, first and last child blocks added at the top level are store in the `wp_navigation` post object's post meta). The required logic was added to the Navigation block's code, i.e. inside the Gutenberg code repository, and then synchronized to Core.

In order to harmonize the code between the two endpoints, this changeset introduces a new `update_ignored_hooked_blocks_postmeta` function, which is based on the Navigation block's `block_core_navigation_update_ignore_hooked_blocks_meta`, alongside a few helper functions, and hooks it to the `rest_pre_insert_wp_navigation` filter hook. (The Navigation block has been prepared in [58275] to add an additional conditional to check for the new `update_ignored_hooked_blocks_postmeta` filter so there won't be any collisions.)

Eventually, this will allow to deprecate `block_core_navigation_update_ignore_hooked_blocks_meta` (and some related functions), and remove the relevant code from the Navigation block. It also paves the way for some other future changes, such as inserting a hooked block as a Template Part block's first or last child (#60854).

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


git-svn-id: http://core.svn.wordpress.org/trunk@57751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-06-03 12:05:15 +00:00