Commit Graph

19348 Commits

Author SHA1 Message Date
hellofromTonya
6da9fd24e9 Build/Test Tools: Follow-up to r53432.
Removes comments global resets from base test case.

Follow-up to [53432].

See #54725,#55643.
Built from https://develop.svn.wordpress.org/branches/6.0@53434


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 14:12:08 +00:00
hellofromTonya
f09e937ad4 Build/Test Tools: Add tests and fix comments odd/even instabilities (test leaks).
[53353] Add unit test for Comment Template block.

[53353] The odd / even class attribute global variables are causing issues in comments tests when a new test is added or an existing test is modified. To stabilize the odd / even comment tests, the comment global variables are added to the base test class' tear_down() using the same patterns as the other global resets. This change ensures each comment test starts at the same state. In doing so, the expected odd / even class attributes are no longer affected by previous tests, i.e. test leaks.

Also moves the comment globals reset from the base test case to the test's `tear_down()`. Why? To avoid risks to extenders' tests as it's too late in the 6.0 cycle for a dev note.

Follow-up to [53298], [53172], [53138].

Props bernhard-reiter, darerodz, gziolo, hellofromTonya, zieladam, peterwilsoncc.
Merges [53353] and [53430] to the 6.0 branch.
Fixes #54725,#55643.
Built from https://develop.svn.wordpress.org/branches/6.0@53432


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 14:06:14 +00:00
Sergey Biryukov
48c2a75622 Post WordPress 6.0 RC4 version bump.
Built from https://develop.svn.wordpress.org/branches/6.0@53425


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 16:49:10 +00:00
Sergey Biryukov
795bcce594 WordPress 6.0 RC4
Built from https://develop.svn.wordpress.org/branches/6.0@53424


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 16:23:10 +00:00
Sergey Biryukov
f8001c5b1e Bundled themes: Bump versions for WordPress 6.0 release.
Bump bundled theme version numbers in preparation for the WordPress 6.0 release. Each theme's _tested up to_ file header has been increased to indicate WordPress 6.0 support.

The new version numbers are:

* Twenty Ten: 3.7
* Twenty Eleven: 4.1
* Twenty Twelve: 3.7
* Twenty Thirteen*: 3.7
* Twenty Fourteen: 3.4
* Twenty Fifteen*: 3.2
* Twenty Sixteen*: 2.7
* Twenty Seventeen*: 3.0
* Twenty Nineteen: 2.3
* Twenty Twenty: 2.0
* Twenty Twenty-One: 1.6

An asterisk indicates the theme includes assets requiring a manual version bump, this is set to the reverse date format of the release day: `20220524`.

Follow up to [53286] in which the Twenty Twenty-Two theme version was bumped to 1.2.

Props peterwilsoncc, desrosj, costdev, mehedi890.
Merges [53418] to the 6.0 branch.
Fixes #55754.
Built from https://develop.svn.wordpress.org/branches/6.0@53423


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 16:08:14 +00:00
gziolo
1d7e2f9bdf Editor: Update WordPress packages for 6.0 RC 4
[53419] Editor: Fix opinionated block styles loading in editor

[53420] Editor: Update WordPress packages for 6.0 RC 4

[53421] Docs: Add missing documentation for fallback_gap_value param

Props SergeyBiryukov, zieladam, jffng.
Merges [53419], [53420] and [53421] to the 6.0 branch.
Fixes #55567.




Built from https://develop.svn.wordpress.org/branches/6.0@53422


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 15:51:26 +00:00
Peter Wilson
2011bb9093 Themes: Accept valid block themes.
Updates theme validation to accept block themes. This replaces the requirement for an `index.php` with a requirement for either an `index.php`, `/templates/index.html` or the deprecated `/block-templates/index.html`.

Validation is updated for theme uploads, within `WP_Theme::__construct` and `validate_current_theme()`. 

A block theme using the deprecated file structure is now included in the unit tests.

Props peterwilsoncc, sergeybiryukov, hellofromtonya, costdev, azaozz, gziolo, FlorianBrinkmann, Boniu91, aristath, poena, audrasjb.
Merges [53416] to the 6.0 branch.
Fixes #55682.

Built from https://develop.svn.wordpress.org/branches/6.0@53417


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 01:01:14 +00:00
Peter Wilson
5541f90c38 Site Editor: Include style parameter in home template redirect.
When redirecting the site editor to the home template include the `style` querystring parameter if it is set. This ensures the style panel opens if the user expects it.

Props grantmkin, mamaduka, peterwilsoncc, gziolo.
Merges [53413] to the 6.0 branch.
Fixes #55752.


Built from https://develop.svn.wordpress.org/branches/6.0@53415


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 00:19:20 +00:00
ryelle
94a29bade1 Help/About: Ensure about page shows current header.
Add a query string parameter to the about page header images to ensure the cache is broken in browsers and CDNs.

Props ryelle.
Merges [53409] to the 6.0 branch.
Fixes #55750.


Built from https://develop.svn.wordpress.org/branches/6.0@53412


git-svn-id: http://core.svn.wordpress.org/branches/6.0@53001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-18 15:42:15 +00:00
Sergey Biryukov
acd0c4329f Post WordPress 6.0 RC3 version bump.
Built from https://develop.svn.wordpress.org/branches/6.0@53407


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 16:38:27 +00:00
Sergey Biryukov
829c54b81a WordPress 6.0 RC3
Built from https://develop.svn.wordpress.org/branches/6.0@53406


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 16:13:23 +00:00
gziolo
347a117b37 Editor: Update WordPress packages for 6.0 RC 3
[53402] Theme: Use a better method to determine the theme name during export

[53403] Editor: Update WordPress packages for 6.0 RC 3

[53404] Editor: Return additional block patterns to server-generated settings

Props SergeyBiryukov, scruffian, davidbaumwald, jeremyfelt, zieladam, ndiego, jsnajdr, peterwilsoncc, johnstonphilip.
Merges [53402], [53403] and [53404] to the 6.0 branch.
Fixes #55567.


Built from https://develop.svn.wordpress.org/branches/6.0@53405


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 15:43:41 +00:00
hellofromTonya
1af74a4629 Editor: Use stricter assertions in comment template tests.
Backport of the remaining Comment Template block tests from Gutenberg:

* `assertEquals()` replaced with `assertSameSetsWithIndex()`.
* assertion's argument order changed to ensure expected and then actual.

Follow-up to [53353], [53298], [53172], [53138].

Props bernhard-reiter.
Merges [53388] to the 6.0 branch.
Fixes #55708.
Built from https://develop.svn.wordpress.org/branches/6.0@53389


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 21:42:08 +00:00
Sergey Biryukov
c52fb4abf9 Post WordPress 6.0 RC2 version bump.
Built from https://develop.svn.wordpress.org/branches/6.0@53387


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 18:04:10 +00:00
Sergey Biryukov
d9b3f05bc0 WordPress 6.0 RC2
Built from https://develop.svn.wordpress.org/branches/6.0@53386


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 17:30:09 +00:00
ryelle
83ec312628 Administration: Update design of the Dashboard welcome panel.
This updates the panel to match the 6.0 About page styles, with the 6.0 graphic changing color based on the selected admin color scheme.

Props fcoveram, critterverse, joedolson, SergeyBiryukov.
Merges [53383] to the 6.0 branch.
Fixes #55532.


Built from https://develop.svn.wordpress.org/branches/6.0@53385


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 17:10:09 +00:00
ryelle
22a6198eb8 Help/About: Update the About section for 6.0.
Switch the images to use the s.w.org CDN. Update the font style and spacing on the About page. Update the header images for Credits, Freedoms, and Privacy.

Props fcoveram, peterwilsoncc, SergeyBiryukov.
Merges [53382] to the 6.0 branch.
Fixes #55434.


Built from https://develop.svn.wordpress.org/branches/6.0@53384


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:58:08 +00:00
hellofromTonya
b873fd1377 Editor: Update WordPress packages for 6.0 RC 2.
[53377] Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 RC 1.

[53378] Includes cherry-picked commit from the Gutenberg plugin that fix a bug discovered just before WordPress 6.0 RC 2.

Props zieladam, ndiego, kebbet, hellofromTonya.
Merges [53377] and [53378] to the 6.0 branch.
Fixes #55567.

Built from https://develop.svn.wordpress.org/branches/6.0@53381


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:22:27 +00:00
Sergey Biryukov
0bb6a7c175 Media: Remove error suppression in wp_filesize().
Replace error suppressing in `wp_filesize()` with a `file_exists()` check before calling the native PHP `filesize()` function.

Follow up to [52837].

Props Cybr, johnbillion, spacedmonkey, antpb, azouamauriac, ironprogrammer, mukesh27, costdev, audrasjb, dlh, peterwilsoncc.
Merges [53372] to the 6.0 branch.
Fixes #55678.
See #49412.
Built from https://develop.svn.wordpress.org/branches/6.0@53380


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:12:08 +00:00
Sergey Biryukov
f7c8a72b6b Query: Restore late compact() call for the posts_clauses_request filter.
This addresses a backward compatibility break where `posts_join_request` and other filters were applied, but their results were subsequently discarded and earlier values were used instead.

Follow-up to [52974], [53175].

Props 5um17, johnbillion, peterwilsoncc, hellofromTonya, SergeyBiryukov.
Merges [53370] and [53375] to the 6.0 branch.
Fixes #55699.
Built from https://develop.svn.wordpress.org/branches/6.0@53379


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:09:11 +00:00
Peter Wilson
f5ddcf6c76 Users: Allow any DB field to be returned by WP_User_Query.
Restore behaviour of `fields` parameter in `WP_User_Query` to allow developers to specify any database field to be returned either individually or as part of a subset. Add these fields to the documentation.

When a subset of `fields` includes the `id` paramater, include it in the results in both upper and lowercase to maintain backward compatibility.

Follow up to [53327].

Props dd32, pbearne, kraftbj, peterwilsoncc, SergeyBiryukov.
Merges [53362,53373] to the 6.0 branch.
Fixes #53177.

Built from https://develop.svn.wordpress.org/branches/6.0@53374


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 05:53:10 +00:00
Peter Wilson
821cd18d54 Quick/Bulk Edit: Additional tests for showing taxonomies.
Additional tests to ensure taxonomies show in the quick/bulk edit froms based on the `show_in_quick_edit` setting rather than the the `show_ui` setting.

Follow up to [52841,31307].

Props figureone, costdev, audrasjb.
Merges [53368] to the 6.0 branch.
Fixes #49701.


Built from https://develop.svn.wordpress.org/branches/6.0@53369


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-09 00:53:09 +00:00
Peter Wilson
3ab07afe02 Script Loader: Fix i18n edge case breaking dependencies.
Prevent concatenation of scripts if the text domain is defined to ensure the dependency order is respected.

This accounts for an edge case in which replacing a core script via a plugin and a lack of translations (eg, for a US English site) could cause the JavaScript files to be ordered incorrectly.

Follow up to [52937].

Props audrasjb, boniu91, chaion07, costdev, hellofromtonya, jsnajdr, mukesh27, ndiego, ugyensupport, SergeyBiryukov.
Merges [53360,53366] to the 6.0 branch.
Fixes #55628.


Built from https://develop.svn.wordpress.org/branches/6.0@53367


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-09 00:03:18 +00:00
Peter Wilson
afa1841d32 Quick/Bulk Edit: Remove duplicate HTML IDs.
Rename `#inline-edit-legend` to avoid duplicate HTML IDs. These have been renamed `#quick-edit-legend` and `#bulk-edit-legend` for the quick and bulk editors respectively.

This HTML ID is not required by the quick editor duplicated via JavaScript so is removed as part of the duplication process.

Follow up to [53096].

Props azaozz, costdev, greglone, hellofromtonya, ironprogrammer, joedolson, sabernhardt, SergeyBiryukov, audrasjb.
Merges [53352] to the 6.0 branch.
Fixes #55575.
See #35483.

Built from https://develop.svn.wordpress.org/branches/6.0@53361


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 03:10:13 +00:00
John Blackbourn
25fc443da5 Build/Test Tools: Allow the local development environment to run on Apple M1 machines without requiring local configuration changes.
The `amd64/mysql` and `amd64/mariadb` official images from Docker are compatible with x86 running on the ARM64v8 architecture of M1 machines.

Merges [53358] to the 6.0 branch.

Fixes #52356

Built from https://develop.svn.wordpress.org/branches/6.0@53359


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-06 17:27:14 +00:00
audrasjb
974c591ce3 Help/About: Add link to 6.0 Field Guide, fix missing placeholder in string.
Follow-up to [53339].

Props audrasjb, ryelle.
Merges [53354] to the 6.0 branch.
See #55434.

Built from https://develop.svn.wordpress.org/branches/6.0@53356


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 22:03:13 +00:00
Sergey Biryukov
1aed9d14c0 Build/Test Tools: Pass GitHub Actions environment variables to the Docker container.
This ensures that `WP_UnitTestCase::skipOnAutomatedBranches()` has access to the `GITHUB_REF` and `GITHUB_EVENT_NAME` variables, so that some tests can be skipped when appropriate.

Additionally, account for renaming the `master` branch to `trunk` in November 2021.

Follow-up to [40241], [46999], [49264], [49267], [51868].

Merges [53349] to the 6.0 branch.
Fixes #55668.
Built from https://develop.svn.wordpress.org/branches/6.0@53350


git-svn-id: http://core.svn.wordpress.org/branches/6.0@52939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-04 11:44:55 +00:00
Sergey Biryukov
61f74edbb3 Security: Update the Security Policy to include WordPress 6.0.
Built from https://develop.svn.wordpress.org/trunk@53342


git-svn-id: http://core.svn.wordpress.org/trunk@52931 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 17:34:09 +00:00
Sergey Biryukov
9efd001e48 Post WordPress 6.0 RC1 version bump.
Built from https://develop.svn.wordpress.org/trunk@53341


git-svn-id: http://core.svn.wordpress.org/trunk@52930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 17:15:10 +00:00
Sergey Biryukov
638a31b8d3 WordPress 6.0 RC1
Built from https://develop.svn.wordpress.org/trunk@53340


git-svn-id: http://core.svn.wordpress.org/trunk@52929 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 16:46:09 +00:00
ryelle
7bd9548322 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52928 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 16:28:09 +00:00
hellofromTonya
e9267bf3ee 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.
Built from https://develop.svn.wordpress.org/trunk@53338


git-svn-id: http://core.svn.wordpress.org/trunk@52927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 15:00:36 +00:00
audrasjb
4de4330b17 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 14:53:09 +00:00
hellofromTonya
7b880889bc 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.
Built from https://develop.svn.wordpress.org/trunk@53336


git-svn-id: http://core.svn.wordpress.org/trunk@52925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 14:33:12 +00:00
Sergey Biryukov
0c9c1d5297 Post WordPress 6.0 Beta 4 version bump.
Built from https://develop.svn.wordpress.org/trunk@53335


git-svn-id: http://core.svn.wordpress.org/trunk@52924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 16:44:10 +00:00
Sergey Biryukov
26d851eefe WordPress 6.0 Beta 4.
Built from https://develop.svn.wordpress.org/trunk@53334


git-svn-id: http://core.svn.wordpress.org/trunk@52923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 16:10:10 +00:00
hellofromTonya
1cca8be49f 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.
Built from https://develop.svn.wordpress.org/trunk@53333


git-svn-id: http://core.svn.wordpress.org/trunk@52922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 14:00:09 +00:00
audrasjb
9d10c963ff 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:32:08 +00:00
Sergey Biryukov
9c76c77398 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.
Built from https://develop.svn.wordpress.org/trunk@53331


git-svn-id: http://core.svn.wordpress.org/trunk@52920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:13:08 +00:00
Sergey Biryukov
056bbc95ea 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.
Built from https://develop.svn.wordpress.org/trunk@53330


git-svn-id: http://core.svn.wordpress.org/trunk@52919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 13:07:14 +00:00
gziolo
afd35d1958 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.



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


git-svn-id: http://core.svn.wordpress.org/trunk@52918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 10:39:04 +00:00
Peter Wilson
0fcdd744c1 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 02:46:11 +00:00
Peter Wilson
4a7bcc14e4 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.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 00:14:29 +00:00
Sergey Biryukov
8267fdc9a2 Tests: Add unit tests for some XML-RPC functions:
* `xmlrpc_getposttitle()`
* `xmlrpc_getpostcategory()`
* `xmlrpc_removepostdata()`

Props pbearne, audrasjb, costdev, SergeyBiryukov.
Fixes #53490.
Built from https://develop.svn.wordpress.org/trunk@53326


git-svn-id: http://core.svn.wordpress.org/trunk@52915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-02 00:13:12 +00:00
audrasjb
403f9d53f1 Coding standards: Remove extra spaces in docblocks of the Walker_PageDropdown class.
Follow-up to [51779].

See #54728.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-01 22:01:10 +00:00
audrasjb
df39328035 Docs: Clarify the name and description of some parameters in the Walker class.
Follow-up to [53323].
See #54729.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52913 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-01 21:47:10 +00:00
audrasjb
9df9561ce9 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.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-01 21:41:12 +00:00
Sergey Biryukov
c36f700fda 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.
Built from https://develop.svn.wordpress.org/trunk@53322


git-svn-id: http://core.svn.wordpress.org/trunk@52911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-01 16:24:14 +00:00
Sergey Biryukov
83c7440590 Tests: Add unit tests for wp_fuzzy_number_match().
Props pbearne, costdev, mukesh27, hellofromTonya, SergeyBiryukov.
Fixes #54239.
Built from https://develop.svn.wordpress.org/trunk@53321


git-svn-id: http://core.svn.wordpress.org/trunk@52910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-01 16:13:19 +00:00
Sergey Biryukov
7fd2f89da7 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.
Built from https://develop.svn.wordpress.org/trunk@53319


git-svn-id: http://core.svn.wordpress.org/trunk@52908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-30 11:35:16 +00:00