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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53370 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53368 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53362 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53360 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53357 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53353 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53349 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@53347 602fd350-edb4-49c9-b593-d223f7449a82
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
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
[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
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
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
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
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
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
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
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
Adds `_wp_theme_json_webfonts_handler()` for handling `fontFace` declarations in a theme's `theme.json` file to generate the `@font-face` styles for both the editor and front-end.
Design notes:
* It is not a public API, but rather an internal, Core-only handler.
* It is a stopgap implementation that will be replaced when the public Webfonts API is introduced in Core.
* The code design is intentional, albeit funky, with the purpose of avoiding backwards-compatibility issues when the public Webfonts API is introduced in Core.
* It hides the inter-workings.
* Does not exposing API ins and outs for external consumption.
* Only works for `theme.json`.
* Does not provide registration or enqueuing access for plugins.
For more context on the decision to include this stopgap and the Webfonts API, see:
* Core's PR 40493 https://github.com/WordPress/gutenberg/pull/40493
* Gutenberg's tracking issue 40472 https://github.com/WordPress/gutenberg/issues/40472
Props aristath, hellofromTonya, peterwilsoncc, costdev, jffng, zieladam, gziolo, bph, jonoaldersonwp, desrosj.
See #55567, #46370.
git-svn-id: https://develop.svn.wordpress.org/trunk@53282 602fd350-edb4-49c9-b593-d223f7449a82
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 2.
Props zieladam, ndiego.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53278 602fd350-edb4-49c9-b593-d223f7449a82
Backports changes from https://github.com/WordPress/gutenberg/pull/40468.
The lock attribute needs to be supported by every block, but currently, it is only done on the client site. As a result, it was causing block rendered API requests to fail when blocks are locked.
Props mamaduka, peterwilsoncc.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53268 602fd350-edb4-49c9-b593-d223f7449a82
The Gallery block unit tests still use the old format, so this updates it to the new format that uses nested Image blocks.
Props glendaviesnz.
Fixes#55571.
git-svn-id: https://develop.svn.wordpress.org/trunk@53261 602fd350-edb4-49c9-b593-d223f7449a82
This change ensures the `fields` parameter is taken into account when running `WP_User_Query` by fixing the conditional statement used to process the `fields` param.
Props rilwis, peterwilsoncc, NomNom99, hellofromTonya, audrasjb, rilwis, Boniu91.
Fixes#53177.
git-svn-id: https://develop.svn.wordpress.org/trunk@53255 602fd350-edb4-49c9-b593-d223f7449a82
This change filters out empty entries from `WP_Theme::get_files()` before returning the array of files. This avoid returning an entry with `false` value when the directory of the theme does not exist.
Props dd32, opurockey, Rahmohn, audrasjb.
Fixes#53599.
git-svn-id: https://develop.svn.wordpress.org/trunk@53253 602fd350-edb4-49c9-b593-d223f7449a82
Normalize an invalid `sticky_posts` option to an empty array within `stick_post()`. This fixes a bug in which an unexpected option value would prevent new posts from being made sticky.
Follow up to [50380].
Props azouamauriac, denishua, kajalgohel, sergeybiryukov, costdev.
Fixes#55176.
git-svn-id: https://develop.svn.wordpress.org/trunk@53238 602fd350-edb4-49c9-b593-d223f7449a82
Improve tests for `is_wp_version_compatible()` and `is_php_version_compatible()`.
Follow up to [53227].
Props costdev, SergeyBiryukov.
Fixes#54257.
git-svn-id: https://develop.svn.wordpress.org/trunk@53237 602fd350-edb4-49c9-b593-d223f7449a82
Previously, the `Last-Modified` header of comments feed was using the date/time of the last comment. This behavior was breaking caching and causing feed readers to believe there is no new content even when there might be new posts.
This commit changes this behavior to use the newest date from both `get_lastcommentmodified()` and `get_lastpostmodified()` functions instead of only using the result from `get_lastcommentmodified()`.
Props xiven, mauteri, costdev, audrasjb.
Fixes#47968.
git-svn-id: https://develop.svn.wordpress.org/trunk@53233 602fd350-edb4-49c9-b593-d223f7449a82
Ensures that preloaded request can include a `_fields` query param that asks that only selected response fields are returned.
Props jsnajdr, timothyblynjacobs.
Fixes#55213.
See #55567.
git-svn-id: https://develop.svn.wordpress.org/trunk@53217 602fd350-edb4-49c9-b593-d223f7449a82
The new "Featured Image" enhancement is handled dynamically, so we need to update how the Cover block is handled in the build processa and registered in the code.
Props ironprogrammer, costdev, Mamaduka, chaion07.
Fixes#55580.
git-svn-id: https://develop.svn.wordpress.org/trunk@53212 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces a link to the outdated W3C specs on Custom Elements with a link to the corresponding WhatWG specification.
Follow-up to [53204].
See #54729.
git-svn-id: https://develop.svn.wordpress.org/trunk@53205 602fd350-edb4-49c9-b593-d223f7449a82
Discard the parameters `update_comment_meta_cache` and `update_comment_post_cache` when generating the cache key as neither have an effect on the database query generated.
Props uday17035, spacedmonkey.
Fixes#55460.
git-svn-id: https://develop.svn.wordpress.org/trunk@53169 602fd350-edb4-49c9-b593-d223f7449a82
Adds a new test assertion to handle the supplemental data array passed in `ajax-response.js`.
Follow up to [53123].
Props SergeyBiryukov, peterwilsoncc.
Fixes#55078.
git-svn-id: https://develop.svn.wordpress.org/trunk@53159 602fd350-edb4-49c9-b593-d223f7449a82
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included:
- Avatar
- Comment Author Name
- Comment Content
- Comment Date
- Comment Edit Link
- Comment Rely Link
- Comment Template
- Comments Pagination
- Comments Pagination Next
- Comments Pagination Previous
- Comments Query Loop
- Home Link
- Post Author Biography
- Query No Results
- Read More
See more details in https://github.com/WordPress/wordpress-develop/pull/2564.
Props zieladam, ramonopoly, ocean90.
Fixes#55505.
git-svn-id: https://develop.svn.wordpress.org/trunk@53157 602fd350-edb4-49c9-b593-d223f7449a82
Let's unregister the block in the tear_down method. The block will be unregistered even if the test fails.
Props ramonopoly, antonvlasenko.
See #55505.
Follow-up [53085], [53076].
git-svn-id: https://develop.svn.wordpress.org/trunk@53153 602fd350-edb4-49c9-b593-d223f7449a82
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/39889.
Backporting changes from the Gutenberg plugin:
- new Block Patterns REST API endpoint
- new Block Pattern Categories REST API endpoint
- updates to Query Loop related patterns
- support for custom taxonomies in Query Loop block
Props hellofromtonya, peterwilsoncc, ntsekouras, zieladam, ironprogrammer, spacedmonkey, timothyblynjacobs, antonvlasenko, jsnajdr.
See #55505.
git-svn-id: https://develop.svn.wordpress.org/trunk@53152 602fd350-edb4-49c9-b593-d223f7449a82
This version introduces support for the latest Emoji added in Emoji 14.
"Insert witty comment newly supported emoji."
Props kraftbj, desrosj, dd32, milana_cap.
Fixes#55395.
git-svn-id: https://develop.svn.wordpress.org/trunk@53150 602fd350-edb4-49c9-b593-d223f7449a82