45682 Commits

Author SHA1 Message Date
Sergey Biryukov
64025d0abe Post WordPress 6.0 RC1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53341 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 17:13:20 +00:00
Sergey Biryukov
6d93192ee9 WordPress 6.0 RC1
git-svn-id: https://develop.svn.wordpress.org/trunk@53340 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 16:44:39 +00:00
Kelly Choyce-Dwan
2b17e69e72 Help/About: Update the About section for 6.0.
This is the start of the WordPress 6.0 about page, introducing new content and a first pass of the new style.

Props fcoveram, estelaris, JeffPaul, critterverse, chanthaboune, dansoschin, webcommsat, annezazu, marybaum, cbringmann, eidolonnight, laurlittle, sergeybiryukov.
See #55434.



git-svn-id: https://develop.svn.wordpress.org/trunk@53339 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 16:26:53 +00:00
Tonya Mork
4023853156 Editor: Update WordPress packages for 6.0 RC1.
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 Beta 4.

Props gziolo, zieladam, ndiego.

See #55567.

git-svn-id: https://develop.svn.wordpress.org/trunk@53338 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:58:54 +00:00
Jb Audras
929e4e4f9e General: Add missing strong tag to some error messages.
This changeset adds missing `strong` tag to some error messages and updates some AJAX messages, for better consistency.

Follow-up to [53118].

Props NekoJonez, audrasjb, ocean90.
Fixes #54437.


git-svn-id: https://develop.svn.wordpress.org/trunk@53337 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:51:41 +00:00
Tonya Mork
6dab53e93b Editor: Sets 'paged' query arg only when there are comments: build_comment_query_vars_from_block().
A SQL syntax error happened when a post has no comments and "Break comments into pages" is checked in Settings > Discussion. The fix sets the `'paged'` query arg only when there are comments. When there are no comments, `WP_Comment_Query` sets the default `'paged'` value to `1`.

Props bernhard-reiter, luisherranz, czapla, cbravobernal, davidbaumwald, hellofromTonya.

Follow-up to [53142], [53138].
Fixes #55658.

git-svn-id: https://develop.svn.wordpress.org/trunk@53336 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-03 14:31:12 +00:00
Sergey Biryukov
4558de543c Post WordPress 6.0 Beta 4 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@53335 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:42:03 +00:00
Sergey Biryukov
74dd0397fc WordPress 6.0 Beta 4.
git-svn-id: https://develop.svn.wordpress.org/trunk@53334 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 16:08:37 +00:00
Tonya Mork
dc3204ec1d REST API: Fixes /wp/v2/pattern-directory/patterns endpoint response for slug parameter.
[53218] introduced a bug of a wrong response from the `wp/v2/pattern-directory/patterns` endpoint with a `slug` parameter. As the response is cached, it can result in an incorrect list of available patterns supported by the current theme.

This commit resolves by:

* Limiting the `slug` to an `array` in the query parameters.
* When set, parsing and sorting the slug(s) and then serializing the sorted query args as part of the hashed transient keys.

Props antonvlasenko, timothyblynjacobs, spacedmonkey, costdev, hellofromTonya.

Follow-up to [53218], [53152], [51208].
Fixes #55617.

git-svn-id: https://develop.svn.wordpress.org/trunk@53333 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:58:48 +00:00
Jb Audras
9e6e4b5893 Docs: Correct parameter types for serialize_block() and serialize_blocks().
This changeset clarifies the expected type for the first parameter passed to `serialize_block()` and `serialize_blocks()` functions.

Props manooweb.
Fixes #55648.
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53332 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:30:47 +00:00
Sergey Biryukov
50f2d7da7d Docs: Remove @return void from various DocBlocks.
Per the documentation standards, it should not be used outside of the default bundled themes.

Follow-up to [38767], [47055], [49697], [50956], [51003], [52069], [53255].

See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53331 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:11:07 +00:00
Sergey Biryukov
a913b7312d Docs: Improve plugin_install_action_links filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Follow-up to [53074], [53328].

Props afragen, pbiron.
See #55480.

git-svn-id: https://develop.svn.wordpress.org/trunk@53330 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 13:05:53 +00:00
Greg Ziółkowski
e0837a8b18 Editor: Update WordPress packages for 6.0 Beta 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 3.

Props zieladam, ndiego, darerodz.
See #55567.




git-svn-id: https://develop.svn.wordpress.org/trunk@53329 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 10:36:45 +00:00
Peter Wilson
1b9551de27 Plugins: Improve plugin_install_description filter's docs.
Refer developers to `plugins_api()` for array of plugin data.

Props afragen, pbiron, SergeyBiryukov, costdev.
Fixes #55480.



git-svn-id: https://develop.svn.wordpress.org/trunk@53328 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 02:44:04 +00:00
Peter Wilson
63f3914e51 Users: Validate WP_User_Query's fields argument.
Improve validation of `WP_User_Query`'s `fields` argument when passed as an array to ensure it only accepts permitted values. This prevents the invalid values being included in the generated database query.

Expand unit tests to include passing invalid values as part of an array, the lower case value `id`. Correct earlier unit tests to limit database query to one result.

Follow up to [53255].

Props felipeelia.
Fixes #53177.



git-svn-id: https://develop.svn.wordpress.org/trunk@53327 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 00:11:48 +00:00
Sergey Biryukov
36f34cf58d Tests: Add unit tests for some XML-RPC functions:
* `xmlrpc_getposttitle()`
* `xmlrpc_getpostcategory()`
* `xmlrpc_removepostdata()`

Props pbearne, audrasjb, costdev, SergeyBiryukov.
Fixes #53490.

git-svn-id: https://develop.svn.wordpress.org/trunk@53326 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-02 00:11:35 +00:00
Jb Audras
a6afe726b9 Coding standards: Remove extra spaces in docblocks of the Walker_PageDropdown class.
Follow-up to [51779].

See #54728.


git-svn-id: https://develop.svn.wordpress.org/trunk@53325 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:59:49 +00:00
Jb Audras
50add1e31b Docs: Clarify the name and description of some parameters in the Walker class.
Follow-up to [53323].
See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53324 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:45:56 +00:00
Jb Audras
4cfee4c129 Docs: Docblock adjustements in the Walker class.
This changeset ensures third-person singular verbs are used for function descriptions in the `Walker` class, and adjusts some non-standard docblock descriptions for various properties and methods of the class.

See #54729.


git-svn-id: https://develop.svn.wordpress.org/trunk@53323 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 21:39:02 +00:00
Sergey Biryukov
fe01209090 Coding Standards: Remove extra alignment level in the data provider for wp_validate_boolean() tests.
Follow-up to [46159], [46224], [52775], [52776], [52777].

See #54725, #54728.

git-svn-id: https://develop.svn.wordpress.org/trunk@53322 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 16:22:58 +00:00
Sergey Biryukov
4d7e8125ae Tests: Add unit tests for wp_fuzzy_number_match().
Props pbearne, costdev, mukesh27, hellofromTonya, SergeyBiryukov.
Fixes #54239.

git-svn-id: https://develop.svn.wordpress.org/trunk@53321 602fd350-edb4-49c9-b593-d223f7449a82
2022-05-01 16:11:24 +00:00
Sergey Biryukov
6eeaa587e7 Tests: Ignore EOL differences in Webfonts API tests.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Includes renaming the test class to match the [https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/#naming-and-organization naming conventions].

Follow-up to [46612], [48443], [48466], [49691], [51135], [53282].

See #54725.

git-svn-id: https://develop.svn.wordpress.org/trunk@53319 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-30 11:33:30 +00:00
John Blackbourn
84be1644cd Docs: Improve documentation of the walker argument for various functions.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53318 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:27:00 +00:00
John Blackbourn
09cdb9a9bf Docs: Formatting corrections for various docblocks.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53317 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:22:56 +00:00
John Blackbourn
08fb48315a Docs: Corrections and improvements to docblocks for function and hooks relating to fatal error handling.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53316 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 19:15:57 +00:00
John Blackbourn
5612331504 REST API: Correct the schema for the wp/v2/block-directory/search endpoint.
Props zieladam, TimothyBlynJacobs, spacedmonkey, johnbillion

Fixes #53621


git-svn-id: https://develop.svn.wordpress.org/trunk@53315 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 16:53:55 +00:00
Sergey Biryukov
f4416e018d Docs: Adjust comments in Gruntfile.js per the documentation standards.
See #54729.

git-svn-id: https://develop.svn.wordpress.org/trunk@53314 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:44:15 +00:00
Sergey Biryukov
b840fb84ee Docs: Further clarify a comment for the main part of wp-login.php.
Follow-up to [52945].

Fixes #54746.

git-svn-id: https://develop.svn.wordpress.org/trunk@53313 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:35:01 +00:00
Greg Ziółkowski
2b0a984227 Editor: Fix core 'Featured' pattern category registration
Backports changes from https://github.com/WordPress/gutenberg/pull/40650.

Patch fixes regression, and moves core "Featured" pattern category registration from `_load_remote_featured_patterns` into `_register_core_block_patterns_and_categories`.

Follow-up [53152].
Props mamaduka, ntsekouras.
See #55567.



git-svn-id: https://develop.svn.wordpress.org/trunk@53312 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 14:08:44 +00:00
Greg Ziółkowski
6a1f7d02f8 Tools: Further automate backporting from Gutenberg to Core
Follow-up for #51491.

Updating WordPress packages is currently a manual process that takes some reading and trial & error to figure out. This PR adds a single npm task called `sync-gutenberg-packages` that automates this entire process.

Props zieladam.
Fixes #55642.



git-svn-id: https://develop.svn.wordpress.org/trunk@53311 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 13:59:49 +00:00
Sergey Biryukov
c72ab8fa00 Docs: Remove double spaces in tests/phpunit/README.txt.
Props grandeljay.
Fixes #55637.

git-svn-id: https://develop.svn.wordpress.org/trunk@53310 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 13:31:48 +00:00
Jonny Harris
5866165adf Taxonomy: Increase cache hits in WP_Term_Query when using include and exclude parameters.
Ensure that empty values of include and exclude passed to the parameters of `WP_Term_Query`, reused existing caches by 
resetting values to an empty array. 

Props Spacedmonkey, peterwilsoncc, hellofromtonya.
Follow-up to [52970].
See #55352.



git-svn-id: https://develop.svn.wordpress.org/trunk@53309 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 12:34:35 +00:00
Peter Wilson
34ecbc808c Bundled Themes: Note visually hidden text for translators.
Indicate the use of screen reader only text in translator comments.

Props sabernhardt.
Fixes #55591.



git-svn-id: https://develop.svn.wordpress.org/trunk@53308 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 05:01:22 +00:00
Peter Wilson
a010239714 Media: Validate track number ID3 tags before use.
Validate current and total track ID3 tags as numeric before use.

Props mjkhajeh, SergeyBiryukov, costdev.
Fixes #55204.



git-svn-id: https://develop.svn.wordpress.org/trunk@53307 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 04:48:13 +00:00
Peter Wilson
c70c7ad811 Install: Prevent DB errors caused by web fonts API.
Bypass checking `theme.json` for web fonts during the installation of WordPress.

During installation the active theme is considered to be Twenty Twenty-Two (the default theme). As a block theme this prompts a database call when the web fonts API checks the `theme.json` settings, this triggers a database error during installation as the database tables do not exist.

Props chouby, costdev, peterwilsoncc, sergeybiryukov.
Fixes #55632.



git-svn-id: https://develop.svn.wordpress.org/trunk@53306 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-29 03:48:48 +00:00
Sergey Biryukov
613cac5a2d Docs: Make the @return tag for Translation_Entry::key() more precise.
Props manooweb.
Fixes #55640.

git-svn-id: https://develop.svn.wordpress.org/trunk@53305 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 16:51:12 +00:00
Sergey Biryukov
37c08a07f0 Bootstrap/Load: Move some more administration-related hooks to admin-filters.php.
Follow-up to [53266].

Fixes #54795.

git-svn-id: https://develop.svn.wordpress.org/trunk@53304 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 16:37:29 +00:00
Mike Schroder
ebc3417c2d Media: Ensure wp_read_image_metadata filter returns array for $iptc and $exif.
Makes the behavior of the filter lines up with its documentation.
Previously, both `$iptc` and `$exif` could return `false` when `exif_read_data()` or `iptcparse()` failed.

Now, if those functions do not return an array, the results are explicitly set to `array()`.

Props volodymyrkolesnykov, SergeyBiryukov, sabernhardt, sumitsingh, mikeschroder.
Fixes #54637.

git-svn-id: https://develop.svn.wordpress.org/trunk@53303 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 10:58:48 +00:00
John Blackbourn
1cffa3f82b Docs: Various docblock corrections and improvements for changes introduced in 6.0.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53302 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:57:51 +00:00
John Blackbourn
bca354c96c Mail: Improve the docblocks for actions and functions related to the parsing of authentication cookies.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53301 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:52:56 +00:00
John Blackbourn
81eb65fd9e Docs: Various docblock corrections.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53300 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:47:19 +00:00
John Blackbourn
33c08f16d1 Docs: Various docblock improvements.
See #54729


git-svn-id: https://develop.svn.wordpress.org/trunk@53299 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 09:44:12 +00:00
Peter Wilson
832429e9b2 Editor: Show comment previews in the Comment Query Loop.
Update `build_comment_query_vars_from_block()` to show previews of unmoderated comments to the original author of the comment. This duplicates the existing logic in `wp_list_comments()`.

Props darerodz, bernhard-reiter, czapla.
Fixes #55634.



git-svn-id: https://develop.svn.wordpress.org/trunk@53298 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-28 01:16:18 +00:00
Jonathan Desrosiers
47e10bee2a Build/Test Tools: Update the NPM dependencies to the latest versions.
This updates the following development dependencies:

- `@wordpress/scripts` from `22.4.2` to `22.5.0`.
- `chalk` from `4.1.2` to `5.0.1`.
- `grunt` from `1.4.1` to `1.5.2`.
- `grunt-contrib-clean` from ``2.0.0` to `2.0.1`.
- `grunt-contrib-uglify` from `5.1.0` to `5.2.1`.
- `qunit` from `2.18.1` to `2.18.2`.
- `sass` from `1.50.0` to `1.51.0`.
- `sinon` from `13.0.1` to `13.0.2`.
- `uglify-js` from `3.15.3` to `3.15.4`.

Fixes #54727.

git-svn-id: https://develop.svn.wordpress.org/trunk@53297 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 17:19:38 +00:00
Jonathan Desrosiers
65a2a4fac7 External Libraries: Update the underscore library to version 1.13.3.
This is a minor bug fix release.

Fixes #55547.

git-svn-id: https://develop.svn.wordpress.org/trunk@53296 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 14:37:09 +00:00
Jonathan Desrosiers
731b6e18b8 Bundled Themes: Update NPM dependencies for default themes.
This updates all NPM dependencies for all default themes with a `package.json` file (Twenty Nineteen, Twenty Twenty, and Twenty Twenty-One) to their latest versions following the defined version constraints. `npm audit fix` has also been run for each theme.

These updates only resulted in minor changes within built files for Twenty Twenty-One.

See #54727.

git-svn-id: https://develop.svn.wordpress.org/trunk@53295 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 14:23:47 +00:00
Sergey Biryukov
37f91b71c6 Bootstrap/Load: Avoid a PHP warning when setting the $pagenow global in wp-includes/vars.php.
In some scenarios where `is_admin()` returns true but `$_SERVER['PHP_SELF']` does not match a `wp-admin/*` location, setting the `$pagenow` global could trigger a PHP warning: `Undefined array key 1`.

This commit avoids the warning by checking whether the matches array is not empty.

Props janh2, konradyoast, peterwilsoncc.
Fixes #54700.

git-svn-id: https://develop.svn.wordpress.org/trunk@53294 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 13:45:57 +00:00
Peter Wilson
d47a44ab68 Built tools: Reduce file size of About page texture.
Reduce the file size of the file `src/wp-admin/images/about-texture.png` by running it through the grunt precommit hook.

Other modified files are not included in this commit as there is no change in file size.

See #48703.



git-svn-id: https://develop.svn.wordpress.org/trunk@53293 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 05:35:14 +00:00
Peter Wilson
6ff649472b Media: Ensure wp_crop_image() returns correct file type.
Return the correct file path from `wp_crop_image()` when a developer modifies the file type with via the `image_editor_output_format` filter.

Previously the function would return a broken file reference containing the original file extension rather than the one specified via the filter.

Props mat-lipe, adamsilverstein.
Fixes #55403.



git-svn-id: https://develop.svn.wordpress.org/trunk@53292 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 05:19:52 +00:00
Peter Wilson
2b16e7fc01 Comments: Avoid DB error in comment meta queries.
In `WP_Comment_Query` always include the table name when referencing `wp_comments.comment_ID`. This avoids ambiguity in when making meta queries as `wp_commentmeta` includes a column of the same name.

Follow up to [47887].

Props genosseeinhorn, azouamauriac, audrasjb, peterwilsoncc.
Fixes #55218.


git-svn-id: https://develop.svn.wordpress.org/trunk@53291 602fd350-edb4-49c9-b593-d223f7449a82
2022-04-27 04:08:16 +00:00