Commit Graph

32950 Commits

Author SHA1 Message Date
Sergey Biryukov
3be126b751 Tests: Require the zip PHP extension in block templates export file test.
This avoids a test failure if the `ZipArchive` class is missing.

Additionally, this commit replaces an inline check for the `ZipArchive` class in personal data export file tests with a `@requires` annotation, for consistency with similar PHP extension requirements in other tests.

Follow-up to [44786], [51415], [52286].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53454


git-svn-id: http://core.svn.wordpress.org/trunk@53043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-06-01 14:18:10 +00:00
Sergey Biryukov
f2a7f4a387 I18N: Use consistent context for the "Add New" string when referring to media.
This replaces the only instance of the `add new media` context with `file`, used in other instances of the string.

Follow-up to [9198], [10680], [21948].

Props benjgrolleau, tobifjellner, SergeyBiryukov.
Fixes #55876.
Built from https://develop.svn.wordpress.org/trunk@53453


git-svn-id: http://core.svn.wordpress.org/trunk@53042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-31 18:39:10 +00:00
Sergey Biryukov
d0712f35d4 Formatting: Make sanitize_url() the recommended function for sanitizing a URL.
A general security rule is "Sanitize when you save, escape when you echo".

In WordPress 5.9, `sanitize_url()` was un-deprecated in order to better align with the naming of other sanitizing functions, while still being an alias for `esc_url_raw()`.

This commit reverses the order and turns `esc_url_raw()` into a wrapper for `sanitize_url()`, making the latter the canonical function call and aiming to improve performance by reducing the number of function calls required when using the recommended technique.

Follow-up to [11383], [13096], [51597].

Props benjgrolleau, peterwilsoncc, SergeyBiryukov.
See #55852.
Built from https://develop.svn.wordpress.org/trunk@53452


git-svn-id: http://core.svn.wordpress.org/trunk@53041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-31 15:17:14 +00:00
Sergey Biryukov
9268ef9788 Media: Add support for WebP images in the Thickbox library.
This ensures that `.webp` images are properly recognized and displayed in the modal as expected.

Follow-up to [50810], [51227], [52073].

Props ilunabar, graham73may, sabernhardt, mukesh27, SergeyBiryukov.
Fixes #55786.
Built from https://develop.svn.wordpress.org/trunk@53451


git-svn-id: http://core.svn.wordpress.org/trunk@53040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-30 14:53:11 +00:00
Sergey Biryukov
d842b3b5c3 Docs: Explicitly declare some globals for clarity.
This aims to improve developer experience by making it clear that these variables are defined elsewhere.

Props ravipatel, davidbaumwald, hellofromTonya, costdev, SergeyBiryukov.
Fixes #51439.
Built from https://develop.svn.wordpress.org/trunk@53450


git-svn-id: http://core.svn.wordpress.org/trunk@53039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-29 15:35:11 +00:00
Sergey Biryukov
9a2a423eb6 Quick/Bulk Edit: Check the show_in_quick_edit taxonomy property when processing the data for bulk edited posts.
Previously, setting the `show_in_quick_edit` property to `false` removed the taxonomy from the inline edit form, but several taxonomy-related database queries were still being performed in `bulk_edit_posts()` when building the arguments to pass to `wp_update_post()`, even though terms were not modified.

This commit improves performance by avoiding unnecessary database queries when `show_in_quick_edit` is `false`, and mirrors a similar check in the `get_inline_data()` function.

Follow-up to [13535], [14580], [31307], [52841], [53368].

Props Chouby, sabernhardt, costdev, nalininonstopnewsuk, webcommsat, marybaum, meher, wparslan, SergeyBiryukov.
Fixes #42474.
Built from https://develop.svn.wordpress.org/trunk@53449


git-svn-id: http://core.svn.wordpress.org/trunk@53038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-27 15:51:12 +00:00
Peter Wilson
290742cada Budled themes: Revert the Twenty Ten theme version to 3.6.
No functional changes were made to Twenty Ten during the WordPress 6.0 release cycle so the theme version bump is not needed. The "tested up to" header change is maintained.

Follow up to and partial revert of [53418].

Props desrosj, ravipatel, costdev.
Fixes #55810.
See #55754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-25 02:51:09 +00:00
Peter Wilson
cf5cf75f09 Help/About: Add cache busting string to video thumbnail.
Append `?ver=6.0` to the image used for linking to the video to break the cache in browsers, proxy servers and on the CDN.

A new version of the image has been uploaded and replaced the file in the original location.

Props annezazu, critterverse, ryelle, costdev, ironprogrammer, dd32.
Fixes #55808.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-25 02:19:17 +00:00
Peter Wilson
5214e469df Help/About: Finalise links on about page.
Wrap up about page for 6.0 release.

Props ryelle, mukesh27, hellofromTonya, SergeyBiryukov, peterwilsoncc.
Fixes #55775.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 23:53:13 +00:00
Sergey Biryukov
d0e055e68f Coding Standards: Correct alignment in various files.
This fixes an `Equals sign not aligned correctly` WPCS warning.

Additionally, this commit sets the `svn:eol-style` property for the `phpunit/tests/ajax/wpAjaxCropImage.php` file and corrects line endings, so that the output of `composer format` is clean.

Follow-up to [53027], [53217], [53404].

Props hellofromTonya, SergeyBiryukov.
See #55647.
Built from https://develop.svn.wordpress.org/trunk@53441


git-svn-id: http://core.svn.wordpress.org/trunk@53030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 20:40:14 +00:00
Sergey Biryukov
653a3af0d4 Upgrade/Install: Update $_old_files for 6.0.
Props hellofromTonya, JeffPaul, SergeyBiryukov.
Fixes #55794.
Built from https://develop.svn.wordpress.org/trunk@53439


git-svn-id: http://core.svn.wordpress.org/trunk@53028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 17:02:16 +00:00
ryelle
c07f05ab86 Administration: Fix image overlap in Dashboard welcome panel.
Use longhand positioning properties (top, right, etc) so that the rtlcss build process can correctly adjust the layout for the RTL CSS.

Props ryelle, costdev, ironprogrammer, hellofromtonya.
Fixes #55793.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 16:48:15 +00:00
Sergey Biryukov
6e15f7fc9a Docs: Use third-person singular verbs for method descriptions in wp-includes/class-wp-roles.php, per the documentation standards.
See #55646.
Built from https://develop.svn.wordpress.org/trunk@53436


git-svn-id: http://core.svn.wordpress.org/trunk@53025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 15:01:12 +00:00
Sergey Biryukov
b2869c1e62 General: Bump the recommended MariaDB version in readme.html.
MariaDB 10.2 has reached EOL in May 2022. The recommended minimum is bumped to 10.3 for now.

Follow-up to [52319], [52358], [52420], [52424], [53431], [53433], [meta11866].

Props hellofromTonya.
Fixes #55791. See #meta6322.
Built from https://develop.svn.wordpress.org/trunk@53435


git-svn-id: http://core.svn.wordpress.org/trunk@53024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 14:22:10 +00:00
Sergey Biryukov
538587ef1d Tests: Improve the assertions in recommended MySQL and MariaDB version tests.
Comparing human-readable dates instead of numeric timestamps gives identical results, but makes the message more clear in case of failure.

Follow-up to [33946], [52418], [52421], [52424].

See #55791, #55652.
Built from https://develop.svn.wordpress.org/trunk@53433


git-svn-id: http://core.svn.wordpress.org/trunk@53022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 14:09:12 +00:00
hellofromTonya
59d78a1dd4 Build/Test Tools: Temporarily skip MariaDB version test.
TEMPORARY COMMIT.

MariaDB version 10.2 is no longer supported as of 23 May 2022. This commit temporarily skips the version test. Why? To avoid test failures during this period, i.e. until the version is bummped and `readme.html` file changed.

See #55791, [https://meta.trac.wordpress.org/ticket/5999 Meta5999].
Built from https://develop.svn.wordpress.org/trunk@53431


git-svn-id: http://core.svn.wordpress.org/trunk@53020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 13:32:07 +00:00
hellofromTonya
fd34524107 Build/Test Tools: Fix comments odd/even instabilities (test leaks).
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.

Follow-up to [53172].

Props hellofromTonya, zieladam, peterwilsoncc.
See #54725.
Built from https://develop.svn.wordpress.org/trunk@53430


git-svn-id: http://core.svn.wordpress.org/trunk@53019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-23 11:56:13 +00:00
Sergey Biryukov
f6412575c8 Query: Check if $wp_query is set in query loop functions.
This avoids a PHP fatal error if any of these functions are called too early:

* `have_posts()`
* `in_the_loop()`
* `rewind_posts()`
* `the_post()`
* `have_comments()`
* `the_comment()`

bringing some consistency with conditional tags: `is_single()`, `is_home()`, etc.

This commit also removes unnecessary `return` from `the_comment()`, for consistency with `the_post()`. As `WP_Query::the_comment()` does not have a return value, this statement did not have any effect in practice.

Follow-up to [4934], [8807], [16947], [17068], [17083], [49147], [53395], [53396], [53400].

Props vdankbaar, thijso, teunvgisteren, timkersten655, SergeyBiryukov.
Fixes #55722.
Built from https://develop.svn.wordpress.org/trunk@53429


git-svn-id: http://core.svn.wordpress.org/trunk@53018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-22 15:17:14 +00:00
Sergey Biryukov
f4af743ea7 Docs: Correct the type for WP_Post::$post_category and ::$tags_input.
These properties are arrays of category IDs and tag names, respectively, not a single integer or string.

Follow-up to [21651], [31127], [32729], [48941].

Props omaeyusuke.
Fixes #55785.
Built from https://develop.svn.wordpress.org/trunk@53428


git-svn-id: http://core.svn.wordpress.org/trunk@53017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-21 12:07:13 +00:00
desrosj
766a38f2fb Build/Test Tools: Link to a specific run attempt in GitHub Action Slack notifications.
This adjusts the workflow run URLs included in Slack notifications to link to the specific attempt being reported on making it easier for someone to see the proper context of a specific notification.

Additionally, this eliminates the need for a contributor to share the reason for a failure in Slack before restarting the workflow, as the link will always be to that specificattempt. When a “fixed” notification occurs for a subsequent run attempt, the link will be to the new, successful run attempt.

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53427


git-svn-id: http://core.svn.wordpress.org/trunk@53016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 17:42:09 +00:00
Sergey Biryukov
40fc19024f Code Modernization: Replace phpversion() function calls with PHP_VERSION constant.
`phpversion()` return value and `PHP_VERSION` constant value are identical, but the latter is several times faster because it is a direct constant value lookup compared to a function call.

Props ayeshrajans, jrf, mukesh27, costdev, hellofromTonya, SergeyBiryukov.
Fixes #55680.
Built from https://develop.svn.wordpress.org/trunk@53426


git-svn-id: http://core.svn.wordpress.org/trunk@53015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 17:38:14 +00:00
gziolo
59c970101f Docs: Add missing documentation for fallback_gap_value param
Follow-up for [53420]. 

Props SergeyBiryukov.
See #55567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 15:35:14 +00:00
gziolo
cbcf19d09d Editor: Update WordPress packages for 6.0 RC 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 RC 3.

Props zieladam.
See #55567.



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


git-svn-id: http://core.svn.wordpress.org/trunk@53009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 14:32:40 +00:00
gziolo
b020766e3d Editor: Fix opinionated block styles loading in editor
Related changes in Gutenberg: https://github.com/WordPress/gutenberg/pull/40937.

Backport for WordPress 6.0 RC 4.

Props jffng.
See #55567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 11:42:19 +00:00
Peter Wilson
55a5dbcf27 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.
Fixes #55754.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 01:49:16 +00:00
Peter Wilson
ec3b0158d8 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.
Fixes #55754.

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


git-svn-id: http://core.svn.wordpress.org/trunk@53005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-20 00:49:18 +00:00
Sergey Biryukov
4b46629139 Accessibility: List Tables: Hide the Comments column icon and title attribute from screen readers.
The element already has non-visual text, making the icon and the `title` attribute redundant for assistive technologies.

Follow-up to [22439], [27548], [31513], [32991], [50804].

Props sabernhardt, ryokuhi, afercia, karlgroves, SergeyBiryukov.
Fixes #55555. See #24766.
Built from https://develop.svn.wordpress.org/trunk@53414


git-svn-id: http://core.svn.wordpress.org/trunk@53003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-19 15:54:15 +00:00
Peter Wilson
08c5dbc7e9 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.
Fixes #55752.


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


git-svn-id: http://core.svn.wordpress.org/trunk@53002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-19 02:27:13 +00:00
Sergey Biryukov
6d0b0d9a4b Docs: Add missing documentation for some Customize class properties:
* `WP_Customize_Background_Image_Control::$type`
* `WP_Customize_Background_Image_Setting::$id`
* `WP_Customize_Header_Image_Setting::$id`

Follow-up to [21037], [21053], [30885].

Props iamjaydip.
See #55646.
Built from https://develop.svn.wordpress.org/trunk@53411


git-svn-id: http://core.svn.wordpress.org/trunk@53000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-18 15:24:14 +00:00
audrasjb
d4f6347b94 Twenty Twenty-Two: Fix typo in Dark Footer pattern docblock.
Props passoniate, audrasjb.
Fixes #55772.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-18 12:57:12 +00:00
Peter Wilson
88f38062e2 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.
Fixes #55750.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-18 03:01:13 +00:00
Sergey Biryukov
2972db4ba5 Users: Fail gracefully when checking mapped capabilities without providing the required object ID.
This avoids an `Undefined array key 0` PHP warning for `current_user_can()` capability checks that require a specific object to check against but an object ID was not passed.

A `_doing_it_wrong()` notice is also added, so that developers and site administrators are aware that the capability mapping is failing in the absence of the required object ID.

The list of mapped capabilities that require an object ID:

* `delete_post` / `delete_page`
* `edit_post` / `edit_page`
* `read_post` / `read_page`
* `publish_post`
* `edit_(post|comment|term|user)_meta` / `delete_*_meta` / `add_*_meta`
* `edit_comment`
* `edit_term` / `delete_term` / `assign_term`

Follow-up to [34091], [34113], [47178].

Props jeherve, peterwilsoncc, henry.wright, johnbillion, mattheweppelsheimer, hellofromTonya, JeffPaul, azouamauriac, Ninos Ego, TobiasBg, wpsmith, GaryJ, nacin, johnstonphilip, azaozz, SergeyBiryukov.
Fixes #44591.
Built from https://develop.svn.wordpress.org/trunk@53408


git-svn-id: http://core.svn.wordpress.org/trunk@52997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 19:01:20 +00:00
gziolo
571e1e01b3 Editor: Return additional block patterns to server-generated settings
Reverts changes from [53155] to ensure backward compatibility.

Companion to Gutenberg changes https://github.com/WordPress/gutenberg/pull/40818. That makes sure that patterns registered with `admin_init` or `current_screen` hooks are not lost.

Props jsnajdr, zieladam, peterwilsoncc, johnstonphilip.
See #55567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 14:38:14 +00:00
gziolo
58dfeaa86f Editor: Update WordPress packages for 6.0 RC 3
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovered after WordPress 6.0 RC 2.

Props zieladam, ndiego.
See #55567.



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


git-svn-id: http://core.svn.wordpress.org/trunk@52992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 13:30:31 +00:00
gziolo
102004b505 Theme: Use a better method to determine the theme name during export
See the same change in the Gutenberg plugin: https://github.com/WordPress/gutenberg/pull/40829.

Props scruffian, davidbaumwald, jeremyfelt.
See #55567.



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


git-svn-id: http://core.svn.wordpress.org/trunk@52991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-17 12:10:14 +00:00
audrasjb
c03decd0cb Users: Fix misalignment of new user password toggle button on mobile.
This fixes an issue where the password hide/show button was misaligned when creating a new user on small screens.

Props kebbet.
Fixes #55558.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-16 22:37:12 +00:00
Sergey Biryukov
aeb3b7530a Tests: Use a data provider in the test for conditional tags returning early if $wp_query is not set.
Follow-up to [53395], [53396].

Props peterwilsoncc.
See #55104.
Built from https://develop.svn.wordpress.org/trunk@53400


git-svn-id: http://core.svn.wordpress.org/trunk@52989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-16 14:11:12 +00:00
audrasjb
e3def96108 Twenty Twenty-One: Add a missing HTML comment to indicate the end of .post-thumbnail section.
Props haritpanchal.
Fixes #55724.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-15 22:34:08 +00:00
audrasjb
c29c6885c0 Coding Standards: Fix params indentation in pre_get_network_by_path hook docblock.
See #55647.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-15 20:32:08 +00:00
audrasjb
200283a99e Docs: Use third-person singular verbs for function descriptions in the WP_Network class.
See #55646.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-15 20:28:07 +00:00
Sergey Biryukov
313f6f8fe0 Tests: Expand the test for conditional tags returning early if $wp_query is not set.
When called too early, conditional query tags should throw a `_doing_it_wrong()` notice and return `false`. This commit verifies that behavior not only for `is_main_query()`, but for all the other conditional tags too.

Follow-up to [16947], [17068], [17083], [18699], [37985], [53395].

See #55104.
Built from https://develop.svn.wordpress.org/trunk@53396


git-svn-id: http://core.svn.wordpress.org/trunk@52985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-15 15:57:13 +00:00
Sergey Biryukov
a5db52030f Query: Check if $wp_query is set in is_main_query().
This avoids a PHP fatal error and triggers a `_doing_it_wrong()` notice if `is_main_query()` is called too early, bringing consistency with all the other `is_*()` conditionals: `is_single()`, `is_home()`, etc.

Follow-up to [16947], [17068], [17083], [18699], [37985].

Props vdankbaar, nhadsall, johnbillion, costdev, thijsoo, teunvgisteren, timkersten655, SergeyBiryukov.
Fixes #55104.
Built from https://develop.svn.wordpress.org/trunk@53395


git-svn-id: http://core.svn.wordpress.org/trunk@52984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-14 15:10:14 +00:00
Sergey Biryukov
04f9d9bdf6 Database: Use generic references to a database server in ms_not_installed().
This replaces the references to “MySQL” with “your host’s database server” on the “Error establishing a database connection” page when Multisite could not be loaded. The generic “database server” term can refer to MySQL or MariaDB. Additionally, this brings some consistency with a similar error message in `wpdb::db_connect()`.

Follow-up to [52367], [52423].

Props tj692, hansjovisyoast, tobifjellner.
Fixes #55701.
Built from https://develop.svn.wordpress.org/trunk@53394


git-svn-id: http://core.svn.wordpress.org/trunk@52983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-13 12:21:13 +00:00
Sergey Biryukov
2130878354 Docs: Replace Codex URL with a corresponding HelpHub article in the Additional CSS section in Customizer.
Follow-up to [45674-45677], [46740], [49912].

Props stevenlinx, audrasjb.
Fixes #55710. See #48987.
Built from https://develop.svn.wordpress.org/trunk@53393


git-svn-id: http://core.svn.wordpress.org/trunk@52982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-12 17:57:17 +00:00
audrasjb
96c26acafd Taxonomy: Set use_desc_for_title to false by default in wp_list_categories()
This change removes the default `title` attribute of category links returned by `wp_list_categories()`, for better accessibility.

Props just0nequestion, joyously, andrija, audrasjb, sabernhardt.
Fixes #55530.
See #24766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-12 14:06:21 +00:00
Sergey Biryukov
f4d9778c98 Menus: Replace "drop down" (noun) with "dropdown" in a few strings.
This makes the spelling more consistent with other instances of the word in core.

Follow-up to [23844], [27676].

Props NekoJonez, mukesh27, SergeyBiryukov.
Fixes #55661.
Built from https://develop.svn.wordpress.org/trunk@53391


git-svn-id: http://core.svn.wordpress.org/trunk@52980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-11 13:22:15 +00:00
audrasjb
3a48bc354d Twenty Twenty-One: i18n fix for privacy policy section title.
This change makes the Twenty Twenty-One privacy policy section title translatable.

Props nlpro.
Fixes #55709.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-11 08:46:17 +00:00
hellofromTonya
88a16c0ad7 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.
Fixes #55708.
Built from https://develop.svn.wordpress.org/trunk@53388


git-svn-id: http://core.svn.wordpress.org/trunk@52977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 21:30:11 +00:00
ryelle
e8c02840a7 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.
Fixes #55532.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:45:08 +00:00
ryelle
8817bba1bf 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.
Fixes #55434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 16:33:08 +00:00
gziolo
8f952495a7 Editor: Update WordPress packages for 6.0 RC 2 (part 2)
Includes cherry-picked commit from the Gutenberg plugin that fix a bug discovere just before WordPress 6.0 RC 2.

Props hellofromtonya, zieladam, kebbet.
See #55567.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 15:57:28 +00:00
gziolo
6a989e83f6 Editor: Update WordPress packages for 6.0 RC 2
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 RC 1.

Props zieladam, ndiego, hellofromtonya.
See #55567.



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


git-svn-id: http://core.svn.wordpress.org/trunk@52966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 14:49:35 +00:00
Sergey Biryukov
cb2d81f6df Coding Standards: Restore the $pieces variable for SQL clauses in query classes.
This is a defensive coding measure that aims to reduce confusion. With this change, `$pieces` is explicitly used for the names, and `$clauses` for the values of the clauses.

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

Props peterwilsoncc.
See #55699.
Built from https://develop.svn.wordpress.org/trunk@53376


git-svn-id: http://core.svn.wordpress.org/trunk@52965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 11:21:09 +00:00
Sergey Biryukov
4959a268c3 Coding Standards: Restore the $pieces variable in WP_Query::get_posts().
This is a defensive coding measure that aims to reduce confusion. With this change, `$pieces` is explicitly used for the names, and `$clauses` for the values of the clauses.

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

Props peterwilsoncc.
See #55699.
Built from https://develop.svn.wordpress.org/trunk@53375


git-svn-id: http://core.svn.wordpress.org/trunk@52964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 11:17:14 +00:00
Peter Wilson
1dff8e7973 Users: Improve WP_User_Query tests following [53362].
Props SergeyBiryukov.
See #53177.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 05:49:11 +00:00
Peter Wilson
8545c4493b 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.
Fixes #55678.
See #49412.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-10 05:02:11 +00:00
Sergey Biryukov
6aa2e2c123 Tests: Move get_inline_data() tests to a more appropriate place.
Since this is an admin template function and the tests check for specific output with certain taxonomy parameters, placing the tests along with other tests for the functions in the same file should make them easier to find and extend than when placed between general taxonomy registration tests.

Follow-up to [52841], [53368].

See #55652.
Built from https://develop.svn.wordpress.org/trunk@53371


git-svn-id: http://core.svn.wordpress.org/trunk@52960 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-09 17:58:13 +00:00
Sergey Biryukov
ad517e9c12 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, SergeyBiryukov.
Fixes #55699.
Built from https://develop.svn.wordpress.org/trunk@53370


git-svn-id: http://core.svn.wordpress.org/trunk@52959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-09 13:51:15 +00:00
Peter Wilson
a5e2970995 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.
Fixes #49701.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-09 00:34:11 +00:00
Peter Wilson
70e7eec175 Script Loader: Explain why i18n prevents concatenation.
Add inline comment to `WP_Scripts::do_item()` explaining why the definition of a text domain prevents concatenation.

Follow up to [53360].

Fixes #55628.
Props SergeyBiryukov.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-08 23:59:11 +00:00
Sergey Biryukov
32c0cfe3b3 Code Modernization: Rename parameters to match native PHP functions in wp-includes/compat.php.
This ensures that parameter names for PHP polyfills in WordPress core 100% match the native PHP parameter names. Otherwise using named parameters with those functions could cause fatal errors for installs where the polyfills kick in.

This commit:
* Renames the `$string` parameter to `$message` in `_()` polyfill.
* Renames the `$str` parameter to `$string` in `mb_substr()` and `mb_strlen()` polyfills.
* Renames the `$raw_output` parameter to `$binary` in `hash_hmac()` polyfill.
* Renames the `$a` and `$b` parameters to `$known_string` and `$user_string` in `hash_equals()` polyfill.
* Renames the `$var` parameter to `$value` in `is_countable()` and `is_iterable()` polyfills.
* Renames the `$arr` parameter to `$array` in `array_key_first()` and `array_key_last()` polyfills.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287], [53364].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55650.
Built from https://develop.svn.wordpress.org/trunk@53365


git-svn-id: http://core.svn.wordpress.org/trunk@52954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-08 00:29:14 +00:00
Sergey Biryukov
8c8b0a203a Code Modernization: Rename parameters that use reserved keywords in wp-admin/includes/template.php.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names.

This commit renames the `$parent` parameter to `$parent_page` in `parent_dropdown()`.

Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137], [53174], [53184], [53185], [53192], [53193], [53198], [53203], [53207], [53215], [53216], [53220], [53230], [53232], [53236], [53239], [53240], [53242], [53243], [53245], [53246], [53257], [53269], [53270], [53271], [53272], [53273], [53274], [53275], [53276], [53277], [53281], [53283], [53284], [53285], [53287].

Props jrf, aristath, poena, justinahinon, SergeyBiryukov.
See #55650.
Built from https://develop.svn.wordpress.org/trunk@53364


git-svn-id: http://core.svn.wordpress.org/trunk@52953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 17:16:13 +00:00
Sergey Biryukov
8f805f4ddd Coding Standards: Remove extra space in wp-admin/admin-ajax.php.
Props rajeshraval786, costdev.
Fixes #55692.
Built from https://develop.svn.wordpress.org/trunk@53363


git-svn-id: http://core.svn.wordpress.org/trunk@52952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 16:21:18 +00:00
Peter Wilson
f6ef37b050 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.
Fixes #53177.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 03:32:11 +00:00
Peter Wilson
b27a924101 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.
Fixes #55628.

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


git-svn-id: http://core.svn.wordpress.org/trunk@52949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-07 02:53:11 +00:00
John Blackbourn
9afce5d0af 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.

Props afragen, justinahinon, desrosj, talldanwp, antonvlasenko, gziolo, aristath, johnbillion

Fixes #52356

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


git-svn-id: http://core.svn.wordpress.org/trunk@52947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-06 17:16:11 +00:00
Sergey Biryukov
b230f10cf5 Tests: Improve the logic of the SECURITY.md test to check all supported versions.
This avoids a test failure if the list of supported WordPress versions is updated before the trunk version is bumped for a new major release.

Follow-up to [47403], [53347].

Fixes #55667.
Built from https://develop.svn.wordpress.org/trunk@53357


git-svn-id: http://core.svn.wordpress.org/trunk@52946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-06 11:11:15 +00:00
Sergey Biryukov
7997df84a8 Site Health: Remove unused variables in WP_Site_Health::get_test_plugin_version().
Follow-up to [44986].

Props david.binda, mukesh27.
Fixes #55683.
Built from https://develop.svn.wordpress.org/trunk@53355


git-svn-id: http://core.svn.wordpress.org/trunk@52944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 16:29:08 +00:00
ryelle
686a22802b Help/About: Add link to 6.0 Field Guide, fix missing placeholder in string.
Props audrasjb.
Follow-up to [53339].
See #55434.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 15:35:10 +00:00
hellofromTonya
7acc6d1682 Editor: Add unit test for Comment Template block.
Backport of 2 tests from Gutenberg for the Comment Template block:

* test line and paragraph breaks are converted into HTML tags.
* test rendering of unapproved comment preview.

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

Props bernhard-reiter, darerodz, gziolo, peterwilsoncc, hellofromTonya. 
Fixes #55643.
See #55634.
Built from https://develop.svn.wordpress.org/trunk@53353


git-svn-id: http://core.svn.wordpress.org/trunk@52942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 15:29:16 +00:00
Peter Wilson
a34abb93b7 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.
Fixes #55575.
See #35483.


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


git-svn-id: http://core.svn.wordpress.org/trunk@52941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-05 03:26:16 +00:00
Sergey Biryukov
18c2eaa8c0 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].

Fixes #55668.
Built from https://develop.svn.wordpress.org/trunk@53349


git-svn-id: http://core.svn.wordpress.org/trunk@52938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-04 00:40:11 +00:00
hellofromTonya
0ea8ac36ba Build/Test Tools: Ensure version number is in 'X.X' format after float math: Tests_Basic::test_security_md().
After subtracing `0.1` from a `X.1` current version, the result was a single digit without the `.0` decimal. Using `number_format()` ensures each current version has a decimal before appending the `.x` before the test.

This commit also reverts [55346] which was a temporary workaround.

Follow-up to [55346], [47403].
Fixes #55667.
Built from https://develop.svn.wordpress.org/trunk@53347


git-svn-id: http://core.svn.wordpress.org/trunk@52936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 18:57:08 +00:00
Sergey Biryukov
68bcc2cbef Tests: Temporarily disable the test for "Supported Versions" section of GitHub Security Policy.
The test needs to be adjusted to handle major version changes correctly.
Built from https://develop.svn.wordpress.org/trunk@53346


git-svn-id: http://core.svn.wordpress.org/trunk@52935 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 18:16:08 +00:00
Sergey Biryukov
9cf0633789 Build/Test Tools: Add the 6.0 branch to the workflow for testing branches.
Built from https://develop.svn.wordpress.org/trunk@53345


git-svn-id: http://core.svn.wordpress.org/trunk@52934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 17:44:08 +00:00
Sergey Biryukov
c583043223 Trunk is now 6.1-alpha.
Built from https://develop.svn.wordpress.org/trunk@53344


git-svn-id: http://core.svn.wordpress.org/trunk@52933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-05-03 17:40:10 +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
John Blackbourn
bdaba2407c Docs: Improve documentation of the walker argument for various functions.
See #54729

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


git-svn-id: http://core.svn.wordpress.org/trunk@52907 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-04-29 19:28:09 +00:00