When querying 'fields' equal to 'all' using the `WP_User_Query` class, this returns an array of `WP_User` objects. A `WP_User` object requires user meta to be primed, as the user's role is stored in user meta. Ensure that all users meta is primed in a single request by calling the `cache_users` function when querying 'fields' equal to 'all'. Soft deprecate fields equal to `all_with_meta` as it now acts the same as 'fields' equal to 'all'.
Props Spacedmonkey, peterwilsoncc, mehulkaklotar, timothyblynjacobs, furi3r.
Fixes#55594.
git-svn-id: https://develop.svn.wordpress.org/trunk@53655 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces `esc_attr` escaping function with `esc_url` as it is more appropriate in the context of a link's `href` attribute.
Props audrasjb, aniketpatel.
Fixes#56108.
git-svn-id: https://develop.svn.wordpress.org/trunk@53654 602fd350-edb4-49c9-b593-d223f7449a82
This should make cron spawning faster on LSAPI by ensuring that cron requests return immediately.
To avoid code repetition, the no caching headers are relocated and always sent. Caching plugins attempting to set these
headers later will replace those set by WordPress Core.
Follow up to [44488].
Props maximej, johnbillion.
Fixes#54668.
git-svn-id: https://develop.svn.wordpress.org/trunk@53653 602fd350-edb4-49c9-b593-d223f7449a82
This adds a description in the "Available Actions" help tab for the "Send password reset" quick action when hovering over a username in the user list.
Follow-up to [50129].
Props kebbet, costdev.
Fixes#55801.
git-svn-id: https://develop.svn.wordpress.org/trunk@53651 602fd350-edb4-49c9-b593-d223f7449a82
Meetup.com was previously removed as an oEmbed source, since they have deprecated their endpoint. The block has also been removed from the editor, see #GB35085.
This commit updates the associated changelog entry for the `oembed_providers` filter to version 6.0.1, as the change is being backported to the 6.0 branch.
Follow-up to [53540].
See #55997.
git-svn-id: https://develop.svn.wordpress.org/trunk@53646 602fd350-edb4-49c9-b593-d223f7449a82
This brings a new version of the Gutenberg code from the [https://github.com/WordPress/gutenberg/tree/wp/6.0 wp/6.0 branch] into core.
The following packages were updated:
* `@wordpress/block-directory` to `3.4.12`
* `@wordpress/block-editor` to `8.5.9`
* `@wordpress/block-library` to `7.3.12`
* `@wordpress/components` to `19.8.5`
* `@wordpress/customize-widgets` to `3.3.12`
* `@wordpress/edit-post` to `6.3.12`
* `@wordpress/edit-site` to `4.3.12`
* `@wordpress/edit-widgets` to `4.3.12`
* `@wordpress/editor` to `12.5.9`
* `@wordpress/format-library` to `3.4.9`
* `@wordpress/icons` to `8.2.3`
* `@wordpress/interface` to `4.5.6`
* `@wordpress/list-reusable-blocks` to `3.4.5`
* `@wordpress/nux` to `5.4.5`
* `@wordpress/plugins` to `4.4.3`
* `@wordpress/preferences` to `1.2.5`
* `@wordpress/reusable-blocks` to `3.4.9`
* `@wordpress/server-side-render` to `3.4.6`
* `@wordpress/widgets` to `2.4.9`
Props zieladam.
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53644 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces `esc_attr` escaping function with `esc_html` as it is more appropriate in this context.
Props chintan1896, afragen, peterwilsoncc, SergeyBiryukov.
Fixes#56101.
git-svn-id: https://develop.svn.wordpress.org/trunk@53640 602fd350-edb4-49c9-b593-d223f7449a82
This aims to provide better context and more details if an unexpected `_doing_it_wrong()` message or deprecation notice is encountered during a test run.
Previously, this would display a message like `Unexpected incorrect usage notice for [...]`, but without any further details, making it harder to track down the actual issue.
Follow-up to [25402], [25408], [25785], [37861], [51872].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53637 602fd350-edb4-49c9-b593-d223f7449a82
This maps `localhost` to the host machine so the requests get routed to the web server container.
Props sandrasanzdev, hasanuzzamanshamim
Fixes#52708
git-svn-id: https://develop.svn.wordpress.org/trunk@53636 602fd350-edb4-49c9-b593-d223f7449a82
This brings parity with WordPress core `wp_die()` handlers and ensures that if a `WP_Error` object is passed as the `$message` argument to `wp_die()`, the PHPUnit test suite displays the error message correctly.
Previously, this would cause a silent fatal error: `Object of class WP_Error could not be converted to string`, leading to just displaying `wp_die called` without any further details.
Follow-up to [28797], [41966], [44666], [45160], [47882].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53634 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the block title and description can be translated.
Follow-up to [53157].
Props cbravobernal, bernhard-reiter, adamziel, gziolo, peterwilsoncc, audrasjb, mukesh27, SergeyBiryukov.
Fixes#56093. See #55809.
git-svn-id: https://develop.svn.wordpress.org/trunk@53631 602fd350-edb4-49c9-b593-d223f7449a82
The URL to create a new menu from the the Navigation Menu widget can be a `javascript:` link to the Customizer Menus panel, so `esc_attr()` is used here instead of `esc_url()`.
Follow-up to [53092].
Props hztyfoon.
Fixes#56128.
git-svn-id: https://develop.svn.wordpress.org/trunk@53630 602fd350-edb4-49c9-b593-d223f7449a82
This allows for cancellation of operations in the PHP container, such as a PHPUnit test suite run.
Fixes#55702
git-svn-id: https://develop.svn.wordpress.org/trunk@53628 602fd350-edb4-49c9-b593-d223f7449a82
This allows actions and filters to access potentially useful contextual information when terms are inserted and updated.
Props mboynes
Fixes#55441
git-svn-id: https://develop.svn.wordpress.org/trunk@53627 602fd350-edb4-49c9-b593-d223f7449a82
This adds a check for the main query in `_resolve_template_for_new_post()` to fix a 404 response when resolving template for new posts or pages caused by the wrong query being modified.
Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/40799#40799: Ensure only the main query is modified when resolving template for new posts]
Follow-up to [52316].
Props petitphp, zieladam, poena, ndiego, gziolo, kebbet, Mamaduka, manfcarlo.
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53593 602fd350-edb4-49c9-b593-d223f7449a82
The `workflow_run` event was added to restore Slack notifications for older branches (5.8 and older) without having to backport any changes while alternate approaches were explored.
The workflow has been tested and refined as a reusable one in `trunk`, and this approach is superior to the `workflow_run` event in several ways.
Primarily, the `workflow_run` event results in a separate workflow run being created for sending Slack notifications after the completion of each workflow triggered by `push`. When called as a reusable workflow, this does not happen and the additional jobs are instead added to the initial workflow. This makes which jobs are sending notifications for the current workflow more clear, and reduces the amount of noise (less workflow runs overall).
The `workflow_run` event also makes some data available in different ways than `push` events. By removing it, much of the logic within the workflow can be simplified.
See #56095.
git-svn-id: https://develop.svn.wordpress.org/trunk@53591 602fd350-edb4-49c9-b593-d223f7449a82
This adjusts the newly added options in the settings endpoint to use the `integer` type instead of `number`. Since these are page IDs and are not supposed to be floats, `integer` is the correct type.
Follow-up to [53588].
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53589 602fd350-edb4-49c9-b593-d223f7449a82
This adds the `show_on_front`, `page_on_front`, and `page_for_posts` options to the settings endpoint that were missed during WP 6.0 backports.
Related PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/38607#38607 Page for Posts: Display notice in template panel]
Props Mamaduka, spacedmonkey, gziolo, jameskoster.
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53588 602fd350-edb4-49c9-b593-d223f7449a82
This changeset fills the existing help tab with more detailed information about available row actions in the Media Library, when using the List view.
Props kebbet, audrasjb, costdev, SergeyBiryukov, mukesh27.
Fixes#55800.
git-svn-id: https://develop.svn.wordpress.org/trunk@53586 602fd350-edb4-49c9-b593-d223f7449a82
Includes:
* Wrapping long single-line comments to multi-line for better readability.
* Formatting code blocks to display correctly on the Code Reference.
* Other minor edits for consistency.
This applies to:
* `wpdb::$allow_unsafe_unquoted_parameters`
* `wpdb::escape_identifier()`
* `wpdb::_escape_identifier_value()`
* `wpdb::prepare()`
* `wpdb::has_cap()`
Follow-up to [53575].
See #52506, #55646.
git-svn-id: https://develop.svn.wordpress.org/trunk@53584 602fd350-edb4-49c9-b593-d223f7449a82
This correctly updates the `actions/cache` action. [53581] updated the inline comment to the latest version but did not update the actual SHA value correctly.
Follow up to [53581].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53582 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following GitHub Actions to the latest versions:
- `actions/checkout`
- `actions/cache`
- `actions/github-script`
- `actions/setup-node`
- `codecov/codecov-action`
- `shivammathur/setup-php`
- `slackapi/slack-github-action`
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53581 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following `devDependencies` to newer versions:
- `dotenv` from `16.0.0` to `16.0.1`.
- `grunt` from `1.5.2` to `1.5.3`.
- `grunt-contrib-qunit` from `6.0.0` to `6.2.0`.
- `grunt-contrib-uglify` from `5.2.1` to `5.2.2`.
- `qunit` from `2.18.2` to `2.19.1`.
- `sass` from `1.51.0` to `1.53.0`.
- `sinon` from `13.0.2` to `14.0.0`.
- `uglify-js` from `3.15.4` to `3.16.1`.
Additionally, `npm audit fix` has been run to update dependencies with vulnerabilities.
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53580 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a `Constant WPINC already defined in src/wp-settings.php on line 16` PHP warning, which happens when running a WordPress install out of the `src` directory after `npm run build:dev`.
Add a comment to clarify the check for built assets and the direct mention of `wp-includes`.
Follow-up to [53518].
Props aristath.
See #54233.
git-svn-id: https://develop.svn.wordpress.org/trunk@53579 602fd350-edb4-49c9-b593-d223f7449a82
The [https://make.wordpress.org/core/2021/02/19/feature-plugin-rollback-update-failure/ Rollback Update Failure feature project] creates a temporary backup of plugins and themes before updating. This aims to make the update process more reliable and ensure that if a plugin or theme update fails, the previous version can be safely restored.
If the [https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure plugin] is installed, `WP_Upgrader::install_package()` will use the `move_dir()` function from there for better performance. Instead of copying a directory from one location to another, it uses the `rename()` PHP function to speed up the process, which is instrumental in creating a temporary backup without a delay. If the renaming failed, it falls back to `copy_dir()` WP function.
This conditional aims to facilitate broader testing of the feature. It is temporary, until the plugin is merged into core.
Props afragen, pbiron, costdev, davidbaumwald, audrasjb, jrf, SergeyBiryukov.
Fixes#56057. See #51857, #54166.
git-svn-id: https://develop.svn.wordpress.org/trunk@53578 602fd350-edb4-49c9-b593-d223f7449a82
This aims to improve performance of the tests by reducing the number of function calls.
Since `$wpdb::placeholder_escape()` saves the result in a static variable on the first run, there is no need for repeated function calls during the same request or test run, as the result would still be the same.
Follow-up to [42056].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53577 602fd350-edb4-49c9-b593-d223f7449a82
For accessibility, input fields should identify their "purpose". The HTML5 attribute `autocomplete` allows for various user data to be quickly autofilled while adding context for some assistive technologies.
This commit adds the appropriate autofill purposes for an author's name, email, and website URL in the comment form template.
Props juliemoynat, bhrugesh96, sabernhardt.
Fixes#55779.
git-svn-id: https://develop.svn.wordpress.org/trunk@53576 602fd350-edb4-49c9-b593-d223f7449a82
WordPress does not currently provide an explicit method for escaping SQL table and column names. This leads to potential security vulnerabilities, and makes reviewing code for security unnecessarily difficult. Also, static analysis tools also flag the queries as having unescaped SQL input.
Tables and column names in queries are usually in-the-raw, since using the existing `%s` will straight quote the value, making the query invalid.
This change introduces a new `%i` placeholder in `$wpdb->prepare` to properly quote table and column names using backticks.
Props tellyworth, iandunn, craigfrancis, peterwilsoncc, johnbillion, apokalyptik.
Fixes#52506.
git-svn-id: https://develop.svn.wordpress.org/trunk@53575 602fd350-edb4-49c9-b593-d223f7449a82
Previously committed in [53455], appears to be accidentally reverted in [53562].
Follow-up to [51597], [53452], [53455], [53562].
See #39265, #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53574 602fd350-edb4-49c9-b593-d223f7449a82
Previously committed in [53492], appears to be accidentally reverted in [53564].
Follow-up to [51619], [51695], [53492], [53563].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53573 602fd350-edb4-49c9-b593-d223f7449a82
One of these was previously renamed to mention `update_metadata_by_mid()`.
While `update_metadata_by_mid()` is indeed called in `wp_ajax_add_meta()` to update an existing meta value, the functionality change that the test intended to verify was in the latter function.
Follow-up to [44153], [53561].
See #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53572 602fd350-edb4-49c9-b593-d223f7449a82
This makes the placement more consistent with the rest of the test suite.
Follow-up to [53561], [53562].
See #39265.
git-svn-id: https://develop.svn.wordpress.org/trunk@53571 602fd350-edb4-49c9-b593-d223f7449a82
[https://github.com/WordPress/gutenberg/issues/38719 In 5.9 these utility classnames were removed], which removed the ability for theme/plugin authors to assign their own custom CSS related to specific layout selections. This was mostly related to the Button block.
This commit adds these classes dynamically based on attributes, rather than saving them to the serialized content.
Original PR from Gutenberg repository:
* [https://github.com/WordPress/gutenberg/pull/41487#41487 Add utility classnames back to blocks that have layout attributes specified]
Props glendaviesnz, peterwilsoncc, andrewserong, zieladam, matveb, samikeijonen.
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53568 602fd350-edb4-49c9-b593-d223f7449a82
This changeset adds a `word-wrap: break-word` CSS declaration to avoid text overflow in the "new application password" notice.
Props Presskopp, hasanuzzamanshamim, yannielsen, audrasjb.
Fixes#54581.
git-svn-id: https://develop.svn.wordpress.org/trunk@53567 602fd350-edb4-49c9-b593-d223f7449a82
The "Error:" prefix was previously removed and accidentally re-added with `@covers` tags.
Follow-up to [53337], [53561].
See #39265.
git-svn-id: https://develop.svn.wordpress.org/trunk@53565 602fd350-edb4-49c9-b593-d223f7449a82