There were two kinds of tests in this file:
* Tests for content of some files in the root directory:
* `license.txt`
* `SECURITY.md`
* `package.json`
* Tests for some utility functions of the test framework itself:
* `strip_ws()`
* `test_mask_input_value()`
The latter are now moved to their own file, `utils.php`.
Follow-up to [22/tests], [81/tests], [103/tests], [25240], [26940], [28064], [28480], [28493], [28523], [28631], [42381], [47403], [53683].
See #39265, #55652.
git-svn-id: https://develop.svn.wordpress.org/trunk@53686 602fd350-edb4-49c9-b593-d223f7449a82
- Deprecate `wp_get_attachment_thumb_file()`.
- Make `wp_get_attachment_thumb_url()` an alias of `wp_get_attachment_image_url()`. This fixes it to return the proper thumbnail URL and fall back to returning the URL to `image_meta['thumb']` if only that exists.
Props: markhowellsmead, mukesh27, csesumonpro, SergeyBiryukov, mikeschroder, killua99, joemcgill, mashukushibiki, mfgmicha, swissspidy, romulodl, nacin, JoshuaAbenazer, wonderboymusic, lonnylot, azaozz.
git-svn-id: https://develop.svn.wordpress.org/trunk@53685 602fd350-edb4-49c9-b593-d223f7449a82
This changeset removes a duplicate definition of the `type_label` property and consolidates the description of this property.
Props dlh, SergeyBiryukov.
Fixes#56072.
git-svn-id: https://develop.svn.wordpress.org/trunk@53678 602fd350-edb4-49c9-b593-d223f7449a82
This removes an extra `foreach` loop and the only variable variable (`$$component`) in core.
Follow-up to [20088,28342,28736-28747], [41629], [41820], [42226], [53670].
Props johnjamesjacoby.
See #54877, #55647.
git-svn-id: https://develop.svn.wordpress.org/trunk@53671 602fd350-edb4-49c9-b593-d223f7449a82
Ensure the database port number is recorded as an integer or `null` (the default port) when parsing the database host.
This is to prevent PHP/MySQLi throwing an exception caused by ports represented as numeric strings.
Props audrasjb, azouamauriac, chaion07, costdev, johnjamesjacoby, jrf, sergeybiryukov.
Fixes#54877.
git-svn-id: https://develop.svn.wordpress.org/trunk@53670 602fd350-edb4-49c9-b593-d223f7449a82
No longer delete the default term option in `unregister_taxonomy()` to improve database performance.
Since taxonomies are registered at runtime and can't be unregistered unless they're already registered, prior to this
change the option was created and deleted on each request.
Deleting the option should occur on a one-time opperation such as plugin deactivation.
Follow up to [48480].
Props dlh.
Fixes#54472.
git-svn-id: https://develop.svn.wordpress.org/trunk@53669 602fd350-edb4-49c9-b593-d223f7449a82
Patterns on the [https://wordpress.org/patterns/ Pattern Directory] can have keywords for better discoverability while searching. The way these are stored [69548ff1f0 was changed from a taxonomy to meta value], but the `/wp/v2/pattern-directory/patterns` endpoint was still pulling from that old value.
The correct property to use for this field is `meta.wpop_keywords`, which returns a single string with comma-separated keywords.
Props ryelle, TimothyBlynJacobs.
See #56126.
git-svn-id: https://develop.svn.wordpress.org/trunk@53665 602fd350-edb4-49c9-b593-d223f7449a82
The intention was for the preview ratio to remain accurate for the user's screen size when the sidebar is open, but this appears to have caused unintended side effects to the preview alignment.
Follow-up to [52647].
Props superbthemescom, Presskopp.
Fixes#56097. See #54764.
git-svn-id: https://develop.svn.wordpress.org/trunk@53663 602fd350-edb4-49c9-b593-d223f7449a82
This ensures the feature is included in the `theme_supports` REST API data for the active theme.
Follow-up to [48171].
Props grantmkin, TimothyBlynJacobs, addiestavlo.
Fixes#55681.
git-svn-id: https://develop.svn.wordpress.org/trunk@53659 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.
Original PR from Gutenberg repository:
* #GB42131 Post Comments Form: Fix warning i18n
The following packages were updated:
* `@wordpress/block-directory` to `3.4.13`
* `@wordpress/block-library` to `7.3.13`
* `@wordpress/customize-widgets` to `3.3.13`
* `@wordpress/edit-post` to `6.3.13`
* `@wordpress/edit-site` to `4.3.13`
* `@wordpress/edit-widgets` to `4.3.13`
Props zieladam, bernhard-reiter, tobifjellner.
See #56058.
git-svn-id: https://develop.svn.wordpress.org/trunk@53657 602fd350-edb4-49c9-b593-d223f7449a82
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