Commit Graph

17905 Commits

Author SHA1 Message Date
Sergey Biryukov f108962185 Docs: Correct description for `wp_pre_insert_user_data` filter.
Props audrasjb.
Fixes #51637.

git-svn-id: https://develop.svn.wordpress.org/trunk@49314 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-26 22:51:51 +00:00
Sergey Biryukov 430320e905 Docs: Correct DocBlock formatting for `render_block()`.
Follow-up to [49310].

See #51606.

git-svn-id: https://develop.svn.wordpress.org/trunk@49312 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-26 21:53:43 +00:00
Sergey Biryukov f09b69c410 Docs: Add missing `@since` tags for properties in some block editor classes:
* `WP_Block_Pattern_Categories_Registry`
* `WP_Block_Patterns_Registry`
* `WP_Block_Supports`

Follow-up to [48156], [49226].

See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@49311 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-26 21:49:26 +00:00
Riad Benguella 7be4701404 Block Editor: Fix WP_Block_Supports class compatibility with Gutenberg-provided class.
When using WordPress trunk with Gutenberg master, there's an incompatibility causing 
the dynamic block generated classes to be omitted.
This commit refactors the block supports to fix that problem.

Props nosolosw.
Fixes #51606.


git-svn-id: https://develop.svn.wordpress.org/trunk@49310 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-26 08:29:04 +00:00
Sergey Biryukov f13776cd8d General: Use correct value for the `speak` property in various CSS files.
Follow-up to [49263].

Props hareesh-pillai.
Fixes #51622.

git-svn-id: https://develop.svn.wordpress.org/trunk@49309 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-26 02:23:24 +00:00
Timothy Jacobs 3646dd2e9f REST API: Prevent PHP warning when metadata schema is missing properties.
This switches to the new `rest_default_additional_properties_to_false()` function which doesn't have this issue and deprecates the `WP_REST_Meta_Fields::default_additional_properties_to_false()` method.

Props austin880625.
Fixes #51389.


git-svn-id: https://develop.svn.wordpress.org/trunk@49308 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-25 20:28:50 +00:00
Sergey Biryukov 715bfc8664 Docs: Correct an example in `wp_kses_normalize_entities()` description.
Props ediamin.
Fixes #51620.

git-svn-id: https://develop.svn.wordpress.org/trunk@49304 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-25 00:12:40 +00:00
Timothy Jacobs 1e030c4062 REST API, XML-RPC: Synchronise empty comment content checks.
The REST API and XML-RPC now uses the same detection methodology for empty comment content as `wp_handle_comment_submission()`. Specifically, comments now have their content trimmed and '0' is allowed.

Props jaswrks, rmccue, dd32, rachelbaker, Cawa-93, aduth, TimothyBlynJacobs.
Fixes #43177.


git-svn-id: https://develop.svn.wordpress.org/trunk@49303 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 22:44:38 +00:00
Timothy Jacobs e66f459435 REST API: Don't validate status if it hasn't changed.
In particular, this allows for sending `status=inherit` to an attachment if it's current status is `inherit`. This status would be rejected because it is an "internal" post status which isn't exposed.

As a general rule, a developer should always be able to PUT back a GET response without error.

Props dfenton, pputzer, TimothyBlynJacobs.
Fixes #40399.



git-svn-id: https://develop.svn.wordpress.org/trunk@49302 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 16:02:34 +00:00
Timothy Jacobs ff989eccce REST API: Make template handling resilient against plugins setting the global post.
Plugins shouldn't be setting the global post object during a REST API request, but if they did this could cause unexpected errors when creating a post with a template.

Props Kipperlenny, TimothyBlynJacobs.
Fixes #49695.


git-svn-id: https://develop.svn.wordpress.org/trunk@49301 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 14:10:26 +00:00
Timothy Jacobs 84e533ab9d REST API: Reuse `namespace` property instead of the undeclared `rest_namespace`.
Props itowhid06.
Fixes #48297.


git-svn-id: https://develop.svn.wordpress.org/trunk@49300 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 13:52:22 +00:00
Timothy Jacobs b8cdf1be50 REST API: Support generating comment up links to custom posts controllers.
The comments controller now uses the `rest_get_route_for_post` function introduced in WordPress 5.5 to generate the link. This function is filterable to allow for custom controllers to properly define their REST API route.

Props dsifford, TimothyBlynJacobs.
Fixes #44152.


git-svn-id: https://develop.svn.wordpress.org/trunk@49299 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 13:18:50 +00:00
Sergey Biryukov 9cf46a7348 Coding Standards: Remove unused `$current_role` variable from Add New User form.
Follow-up to [9614], [28296].

Props ravipatel.
Fixes #51619.

git-svn-id: https://develop.svn.wordpress.org/trunk@49298 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 12:47:50 +00:00
Sergey Biryukov 4a3a7bd041 Coding Standards: Use consistent formatting for `<div class="wrap">` sections in `wp-admin/update-core.php`.
Follow-up to [28500], [28530].

Props ravipatel.
Fixes #51618.

git-svn-id: https://develop.svn.wordpress.org/trunk@49297 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 12:31:07 +00:00
Timothy Jacobs 6722f3aefb REST API: Deprecate `WP_REST_Meta_Fields::register_field()`.
This method never worked properly and cannot be fixed due to incompatible method signatures.

Props flixos90, kadamwhite, jnylen0, TimothyBlynJacobs.
Fixes #39959.


git-svn-id: https://develop.svn.wordpress.org/trunk@49295 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 04:25:22 +00:00
Timothy Jacobs 5e31ccfee2 App Passwords: Improve accessibility.
- Make form inputs stacked instead of inline.
- Provide a visible label for the app name.
- Add screen reader text to dismiss button.
- Make "Revoke" button label more descriptive.
- Use aria-disabled instead of disabled to avoid focus loss.
- Display password in a readonly input to assist copy and paste.
- Remove large sections of italic text.
- Use `.form-wrap` and `.form-field` to give consistent form styling.
- Improve labeling and placeholder text.

Props alexstine, georgestephanis, afercia, TimothyBlynJacobs.
Fixes #51580.


git-svn-id: https://develop.svn.wordpress.org/trunk@49294 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 03:32:46 +00:00
SergeyBiryukov 99b40eed6a Docs: Add missing duplicate hook references for `allow_(dev|minor|major)_auto_core_updates` filters.
Follow-up to [49254].

See #50907.

git-svn-id: https://develop.svn.wordpress.org/trunk@49293 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 00:29:01 +00:00
Sergey Biryukov d92d1bb863 Upgrade/Install: Account for new `WP_AUTO_UPDATE_CORE` values in auto-updates settings form.
This updates `core_auto_updates_settings()` to account for the new `beta` and `rc` values for the `WP_AUTO_UPDATE_CORE` constant.

Additionally, recognize these new values as acceptable in Site Health tests.

Follow-up to [48804], [49245], [49254].

Fixes #51319. See #50907.

git-svn-id: https://develop.svn.wordpress.org/trunk@49292 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 00:24:43 +00:00
Timothy Jacobs 1e85024fb4 App Passwords: Include site_url in the success redirect payload.
Props georgestephanis.
Fixes #51602.


git-svn-id: https://develop.svn.wordpress.org/trunk@49291 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-24 00:05:15 +00:00
Sergey Biryukov 262e16b169 Toolbar: Keep IE 11 scrollbar on the side instead of overlapping the toolbar.
Props sabernhardt, shital-patel, y_kolev.
Fixes #48545.

git-svn-id: https://develop.svn.wordpress.org/trunk@49290 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 19:47:53 +00:00
Sergey Biryukov c7cd21f153 Privacy: Use more appropriate verbiage when downloading personal data export file from a row action.
Props garrett-eclipse, bridgetwillard.
Fixes #49319.

git-svn-id: https://develop.svn.wordpress.org/trunk@49289 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 19:32:01 +00:00
Sergey Biryukov f586f9d799 Posts, Post Types: Set better default title for custom post types without title support.
The default title is now set to "(no title supported)" instead of "Auto Draft".

Props garrett-eclipse, rajanit2000, bridgetwillard, donmhico, nrqsnchz.
Fixes #45516.

git-svn-id: https://develop.svn.wordpress.org/trunk@49288 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 19:07:09 +00:00
Sergey Biryukov 0634a2370d Help/About: Clarify that discouraging search engines does not prevent them from crawling the site.
Props carike, garrett-eclipse, hellofromTonya.
Fixes #51274.

git-svn-id: https://develop.svn.wordpress.org/trunk@49287 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 18:05:52 +00:00
Sergey Biryukov bcc26de235 Coding Standards: Split long `printf()` calls for search results for better readability.
Follow-up to [49284].

See #37353.

git-svn-id: https://develop.svn.wordpress.org/trunk@49286 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 17:17:52 +00:00
Aaron D. Campbell 797e2bf9ff Upgrade/Install: Improve copy for opt-in to automatic major version updates.
Props marybaum, kebbet.
See #50907.


git-svn-id: https://develop.svn.wordpress.org/trunk@49285 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 16:34:43 +00:00
Helen Hou-Sandi e515d61ec0 Administration: Unify search results message on list tables.
This wraps the search string in a `<strong>` tag, which makes easier to parse visually especially when your search string also contains double quotes.

Props Mista-Flo, mapk, sergeybiryukov.
Fixes #37353.


git-svn-id: https://develop.svn.wordpress.org/trunk@49284 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 15:59:34 +00:00
Helen Hou-Sandi ebe858e5a7 Administration: Better targeting for required form field highlighting.
Previously, any `input` or `select` inside of a `.form-invalid` wrapper would get the red border highlighting, including submit buttons which was not visually correct. This now only applies to form elements with a class of `.form-required` inside of the `.form-invalid` wrapper. It also continues to apply the border to elements with both classes (`.form-invalid.form-required`) as that is how some of the admin markup is structured.

Plugin authors may need to do the same sort of class application seen in this commit, i.e. add `.form-required` to certain form elements.

Props sabernhardt, dilipbheda, helen.
Fixes #50686.


git-svn-id: https://develop.svn.wordpress.org/trunk@49283 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 15:03:37 +00:00
Sergey Biryukov a1403240bb Coding Standards: Update some alignment in `wp-admin/authorize-application.php` for consistency.
Save blogs count to a variable for reusing.

Follow-up to [49270].

See #51489.

git-svn-id: https://develop.svn.wordpress.org/trunk@49282 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 01:17:22 +00:00
Sergey Biryukov 2252cdaa8d Docs: Document the return value of `wp_prepare_attachment_for_js()` using hash notation.
Props stevenlinx, Mista-Flo, johnbillion.
Fixes #50835.

git-svn-id: https://develop.svn.wordpress.org/trunk@49281 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-23 00:41:15 +00:00
Timothy Jacobs fe2053f2c1 App Passwords: Support an app_id to uniquely identify instances of an app.
Apps may now optionally include an `app_id` parameter when directing the user to the Authorize Application screen. This allows for instances of an application to be identified and potentially revoked or blocked.

Props TimothyBlynJacobs, georgestephanis.
Fixes #51583.


git-svn-id: https://develop.svn.wordpress.org/trunk@49276 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 15:04:23 +00:00
Sergey Biryukov e4fadc6f4d Upgrade/Install: Add missing `</form>` tag in auto-updates settings form.
Props imath, ahortin, dd32, afragen.
Fixes #51598. See #50907.

git-svn-id: https://develop.svn.wordpress.org/trunk@49274 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 03:36:40 +00:00
Timothy Jacobs 4e58365c5c App Passwords: Fix success=false not being appended to fallback reject url.
Props TimothyBlynJacobs, georgestephanis.
Fixes #51581.


git-svn-id: https://develop.svn.wordpress.org/trunk@49272 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 02:41:33 +00:00
Peter Wilson 9aececb374 XML-RPC: Fix length validation of anonymous commenter's email address.
Fix the first step of validating an anonymous commenters in which the length is checked prior to running regular expressions.

Follow up to [47808].
Fixes #51595.



git-svn-id: https://develop.svn.wordpress.org/trunk@49271 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 02:40:06 +00:00
Timothy Jacobs 4143182d6b App Passwords: Explain that apps can access to all sites in a network.
Props georgestephanis, spacedmonkey, johnjamesjacoby, SergeyBiryukov, marybaum.
Fixes #51489.


git-svn-id: https://develop.svn.wordpress.org/trunk@49270 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-22 02:34:16 +00:00
Sergey Biryukov 530493396b Docs: Add a `@since` note about `async_direct_test` key to the `site_status_tests` filter.
Follow-up to [49232].

See #51547.

git-svn-id: https://develop.svn.wordpress.org/trunk@49266 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-21 14:53:17 +00:00
Sergey Biryukov 325ba4b811 Coding Standards: Rename a variable in `wp-login.php` for consistency with other instances.
See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@49265 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-21 14:44:58 +00:00
Jonathan Desrosiers 9648a29c05 Administration: Fix an invalid property in the Dashicons CSS file.
Props komagain.
Fixes #51587.

git-svn-id: https://develop.svn.wordpress.org/trunk@49263 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-21 13:14:17 +00:00
Helen Hou-Sandi fb28c15e3c Post-post WordPress 5.6 beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@49262 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 22:21:42 +00:00
Helen Hou-Sandi 1bcf3edd59 Post-WordPress 5.6 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@49261 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 22:17:28 +00:00
Helen Hou-Sandi 24705a129e WordPress 5.6 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@49260 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 21:45:21 +00:00
Sergey Biryukov a1663ce580 Coding Standards: Fix WPCS issues in [49258].
See #46619.

git-svn-id: https://develop.svn.wordpress.org/trunk@49259 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 21:18:59 +00:00
Helen Hou-Sandi 0d2249cc21 Privacy: Add "Mark as completed" action.
Props garrett-eclipse, ocean90, joostdevalk, mista-flo, helen.
Fixes #46619.


git-svn-id: https://develop.svn.wordpress.org/trunk@49258 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 21:05:34 +00:00
Timothy Jacobs 18c1ab8e89 REST API: Make sure all supported JSON Schema keywords are output in the index.
Previously, only a small subset of keywords were exposed which limited the utility of `OPTIONS` requests.

Props raubvogel, TimothyBlynJacobs.
Fixes #51020.


git-svn-id: https://develop.svn.wordpress.org/trunk@49257 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 20:17:20 +00:00
Sergey Biryukov fdcff8b475 Comments: Add a filter for top level comments query arguments in `comments_template()`.
Props hellofromTonya, Howdy_McGee, garrett-eclipse, davidbaumwald, thomaslhotta.
Fixes #38074.

git-svn-id: https://develop.svn.wordpress.org/trunk@49256 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 20:09:39 +00:00
Helen Hou-Sandi 27e7c718f6 Privacy: Add requester IP to password reset emails.
Props garrett-eclipse, bridgetwillard, isharis, ocean90.
Fixes #43856.


git-svn-id: https://develop.svn.wordpress.org/trunk@49255 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 20:01:04 +00:00
Helen Hou-Sandi 0e0781edc0 Upgrade/Install: Add UI for opting in to core auto-updates for major versions.
Props audrasjb, karmatosed, aaroncampbell, paaljoachim, davidbaumwald.
Fixes #50907.


git-svn-id: https://develop.svn.wordpress.org/trunk@49254 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 19:33:27 +00:00
Helen Hou-Sandi 29394d8a25 Upgrade/Install: Don't show theme update prompts on subsites.
If you are using `wp_prepare_themes_for_js()` and relying on `updates`/`no_updates` in multisite, you will need to filter that data back in using the `wp_prepare_themes_for_js` hook.

Props pbiron, afragen.
Fixes #49831.


git-svn-id: https://develop.svn.wordpress.org/trunk@49253 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 19:12:54 +00:00
Timothy Jacobs 9defd1fabc REST API: Introduce support for batching API requests.
A new route is introduced, `batch/v1`, that accepts a list of API requests to run. Each request runs in sequence, and the responses are returned in the order they've been received.

Optionally, the `require-all-validate` validation mode can be used to first validate each request's parameters and only proceed with processing if each request validates successfully.

By default, the batch size is limited to 25 requests. This can be controlled using the `rest_get_max_batch_size` filter. Clients are strongly encouraged to discover the maximum batch size supported by the server by making an OPTIONS request to the `batch/v1` endpoint and inspecting the described arguments.

Additionally, the two new methods, `match_request_to_handler` and `respond_to_request` introduced in [48947] now have a `protected` visibility as we don't want to expose the inner workings of the `WP_REST_Server::dispatch` API.

Batching is not currently supported for GET requests.

Fixes #50244.
Props andraganescu, zieladam, TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@49252 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 19:08:48 +00:00
Adam Silverstein bf73097310 Coding Standards: Fix WPCS issues in [49248].
See #42852.


git-svn-id: https://develop.svn.wordpress.org/trunk@49251 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 19:05:51 +00:00
Jonathan Desrosiers 197067c477 Twenty Twenty: Use `jshint` exclude statements instead of `eslint`.
Also, exclude the `node_modules` folder within `twentytwentyone`.

See #51526.

git-svn-id: https://develop.svn.wordpress.org/trunk@49250 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 18:32:03 +00:00
Sergey Biryukov ad2830f903 Coding Standards: Fix WPCS issues in [49242].
See #50774.

git-svn-id: https://develop.svn.wordpress.org/trunk@49249 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 18:29:26 +00:00
Adam Silverstein b07e0b2cfa Users: improve password generation feature.
On the user edit screen improve handling and clarify language: rename the "Generate Password" and "Show password" buttons to "Set New Password". Clicking it always generates a password. Also: improve inline code comments and descriptions.

Props afercia, bookdude13, michaelarestad, pento.
Fixes #42852.



git-svn-id: https://develop.svn.wordpress.org/trunk@49248 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 18:24:40 +00:00
Jonathan Desrosiers 6537dacf41 Twenty Twenty: Import the latest changes from GitHub
For a full list of changes since [49216], see dfe141276c...trunk/.

Props poena, melchoyce, luminuu, aristath, jffng, ryelle, kishanjasani, rolfsiebers, sresok, desrosj.
See #51526.

git-svn-id: https://develop.svn.wordpress.org/trunk@49247 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 18:24:33 +00:00
Timothy Jacobs 54aa0bc7d1 REST API: Add support for the oneOf and anyOf keywords.
This allows for REST API routes to define more complex validation requirements as JSON Schema instead of procedural validation.

The error code returned from `rest_validate_value_from_schema` for invalid parameter types has been changed from the generic `rest_invalid_param` to the more specific `rest_invalid_type`.

Props yakimun, johnbillion, TimothyBlynJacobs.
Fixes #51025.


git-svn-id: https://develop.svn.wordpress.org/trunk@49246 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 18:22:39 +00:00
Sergey Biryukov 194d32b970 Upgrade/Install: Allow WordPress sites to opt-in to beta & RC releases.
The `WP_AUTO_UPDATE_CORE` constant now supports `beta` and `rc` values.

This makes it possible for sites to opt-in to updating to RC (or beta) releases without having to install a plugin, or run on a development version.

Props dd32, knutsp.
Fixes #51319.

git-svn-id: https://develop.svn.wordpress.org/trunk@49245 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 17:54:50 +00:00
Sergey Biryukov 6e5edfe6cf Upgrade/Install: Restore casting `$filter_payload` to an object in `WP_MS_Themes_List_Table::prepare_items()`.
Follow-up to [48750], [49241].

See #50875.

git-svn-id: https://develop.svn.wordpress.org/trunk@49243 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 17:42:36 +00:00
Helen Hou-Sandi bf35285a39 Upgrade/Install: Include "from" version for plugins/themes in email.
This can help with chasing down any issues that may arise and rolling back if necessary. We hope it's not, but it might be.

Props dkotter, garrett-eclipse, pbiron, audrasjb.
Fixes #50774.


git-svn-id: https://develop.svn.wordpress.org/trunk@49242 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 17:38:59 +00:00
Sergey Biryukov 6b5b87db58 Upgrade/Install: Introduce a wrapper for the `auto_update_{$type}` filter checks.
This allows for cleaner checks whether auto-updates are forced for a plugin or theme.

Follow-up to [48750].

Props rebasaurus, garrett-eclipse, SergeyBiryukov.
Fixes #50875.

git-svn-id: https://develop.svn.wordpress.org/trunk@49241 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 17:37:16 +00:00
Jonathan Desrosiers 310d8eb83d Twenty Thirteen: Prevent incorrect link color within the Social Icon block.
Props amolv, shital-patel, poena, davidbaumwald.
Fixes #50809.

git-svn-id: https://develop.svn.wordpress.org/trunk@49240 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 17:33:46 +00:00
Jonathan Desrosiers 2cd6aef680 Emoji: Update Twemoji to version 13.0.1.
This release fixes minor issues with 8 different Emoji and revises the person/woman/man kneeling Emoji to be in a more obvious kneeling position.

🧎

These updates were pushed to a new, `13.0.1` folder on the CDN in [dotorg:16573].

For a full list of changes in this update, see https://github.com/twitter/twemoji/compare/v13.0.0...v13.0.1.

Props hareesh-pillai, otto42, desrosj.
Fixes #51356.

git-svn-id: https://develop.svn.wordpress.org/trunk@49239 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 16:53:43 +00:00
Sergey Biryukov af6ecf2d16 Quick/Bulk Edit: Introduce `quick_edit_dropdown_authors_args` filter.
This allows for customizing the arguments used to generate the Quick Edit authors drop-down.

Additionally, pass the `$bulk` argument to the `quick_edit_dropdown_pages_args` filter, for consistency.

Props Mista-Flo, garrett-eclipse, hellofromTonya.
Fixes #47685.

git-svn-id: https://develop.svn.wordpress.org/trunk@49238 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 16:38:32 +00:00
Sergey Biryukov 980a387347 Site Health: Introduce the `WP_Site_Health::is_development_environment()` method.
This allows Site Health tests to check if the current environment type is set to `development` or `local`.

Use the new method:
* In HTTPS tests, instead of a hardcoded check for `localhost`.
* In `WP_DEBUG` and `WP_DEBUG_DISPLAY` tests, to set the status to `recommended` instead of `critical`.

Props dkotter, Clorith, DavidAnderson, joyously, knutsp, afragen, SergeyBiryukov.
Fixes #47058.

git-svn-id: https://develop.svn.wordpress.org/trunk@49237 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 16:21:12 +00:00
Dominik Schilling 9e83d04f84 I18N: Introduce `WP_Textdomain_Registry` to store text domains and their language directory paths.
Previously, when using `switch_to_locale()` all current loaded text domains were unloaded and added to the `$l10n_unloaded` global. This prevented the just-in-time loading for text domains after a switch. The just-in-time loading was also only possible if the translations were stored in `WP_LANG_DIR`. Both issues have been fixed.

* Adds `WP_Textdomain_Registry` to keep track of the language directory paths for all plugins and themes.
* Updates all `load_*_textdomain()`  functions to store the path in `WP_Textdomain_Registry`.
* Adds `$reloadable` parameter to `unload_textdomain()` to define whether a text domain can be loaded just-in-time again. This is used by `WP_Locale_Switcher::load_translations()`.
* Extends `_load_textdomain_just_in_time()` to also support text domains of plugins and themes with custom language directories.
* Fixes the incorrect `test_plugin_translation_after_switching_locale_twice()` test which should have catch this issue earlier.
* Adds a new test plugin/theme to test the loading of translations with a custom language directory.
* Deprecates the now unused and private `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()` functions.

Props yoavf, swissspidy, dd32, ocean90.
See #26511.
Fixes #39210.

git-svn-id: https://develop.svn.wordpress.org/trunk@49236 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 16:03:58 +00:00
Sergey Biryukov e3f28a9a11 General: Add `$options` parameter to JSON response functions:
* `wp_send_json()`
* `wp_send_json_success()`
* `wp_send_json_error()`

This allows for customizing the options passed to `json_encode()`.

Props eroraghav, hareesh-pillai, garrett-eclipse.
Fixes #51293.

git-svn-id: https://develop.svn.wordpress.org/trunk@49235 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 15:54:43 +00:00
Sergey Biryukov 2defb1ef6c Media: Introduce a filter for `wp_get_attachment_image()` HTML output.
Props prionkor, antpb, donmhico, audrasjb, Mista-Flo, hellofromTonya.
Fixes #50801.

git-svn-id: https://develop.svn.wordpress.org/trunk@49234 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 15:29:42 +00:00
Sergey Biryukov a0be3a4ca7 Docs: Use 3-digit, x.x.x style semantic versioning for `@since 5.6.0` entries in `WP_Image_Editor_Imagick`.
See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@49233 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 14:52:15 +00:00
Jonathan Desrosiers 9f90177b3f Site Health: Improve the reliability of asynchronous tests.
This change adds additional logic to catch HTTP failures that do not return a `WP_Error` object (for example, a wp-json REST API error error).

This also fixes instances where REST API callbacks performed from cron do not work due to a lack of authentication by introducing a direct callback route that asynchronous tests can register.

Props dd32, clorith, timothyblynjacobs.
Fixes #51547.

git-svn-id: https://develop.svn.wordpress.org/trunk@49232 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 14:48:50 +00:00
Sergey Biryukov 62e7a97518 Docs: Update the `@since` note for `_media_states()`.
Follow-up to [49223].

Props mukesh27.
Fixes #42063.

git-svn-id: https://develop.svn.wordpress.org/trunk@49231 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 14:39:49 +00:00
Mike Schroder 7021f5f4b5 Media: Support Stream Wrappers In `WP_Image_Editor_Imagick`
Since `WP_Image_Editor`'s introduction, stream wrappers have functioned in `WP_Image_Editor_GD`, but haven't been properly supported in `WP_Image_Editor_Imagick`.

- Detects stream wrappers and uses `file_put_contents()` along with `Imagick::read/getImageBlob()` for handling when necessary.
- Introduces private method, `WP_Image_Editor_Imagick::write_image` to handle detection and proper saving.
- Introduces `WP_Test_Stream` class for testing stream wrappers, along with new tests for Imagick's stream handling and a stream filename test.

Adds requirement for `Imagick::readImageBlob()`, available in Imagick >= 2.0.0, which aligns with the current requirement of Imagick >= 2.2.0.

Props p00ya, calin, joemcgill, pputzer, jimyaghi, mikeschroder.
Fixes #42663.

git-svn-id: https://develop.svn.wordpress.org/trunk@49230 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 14:35:10 +00:00
Jonathan Desrosiers fc378e2fe5 Site Health: Use consistent padding around header tags.
Props vinita29, clorith.
Fixes #50638.

git-svn-id: https://develop.svn.wordpress.org/trunk@49229 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 14:16:27 +00:00
Riad Benguella 9fc20595b6 Block Editor: Update the WordPress Packages to the latest version.
This includes the packages that match the Gutenberg 9.2 Release.
It is going to be the last block-editor features update for WordPress 5.6.
It also updates the block-supports code base to the latest APIs.

Props isabel_brison, noisysocks, desrosj.
Fixes #51570.


git-svn-id: https://develop.svn.wordpress.org/trunk@49226 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 13:33:02 +00:00
Jonathan Desrosiers a8d80fd4a7 Coding Standards: Correct some minor coding standards issues.
Introduced in [49154], [49212], [49223], and [49224].

git-svn-id: https://develop.svn.wordpress.org/trunk@49225 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 13:27:48 +00:00
Riad Benguella 123a965c70 Block Editor: Expose api_version in the block type and the REST endpoint.
The new block editor included in 5.6 introduces an api_version property
that indicates which block API version the block is using. 
This commits makes this property available on the block type and the endpoint.

Props TimothyBlynJacobs, gziolo.
Fixes #51529.



git-svn-id: https://develop.svn.wordpress.org/trunk@49224 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 07:52:06 +00:00
Helen Hou-Sandi af767035e7 Media: Indicate if item is or was used as a site option in the details modal.
Props Mista-Flo, melchoyce.
Fixes #42063.


git-svn-id: https://develop.svn.wordpress.org/trunk@49223 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 03:12:07 +00:00
Anthony Burchell b95d64f62a Media: Allow hiding of ‘View attachment page’ link in media modal.
If an empty string is supplied to the `attachment_link` filter the ‘View attachment page’ link will be hidden in the media modal.
Props limera1n, garrett-eclipse, joemcgill, Mista-Flo, hellofromTonya.
Fixes #48325.


git-svn-id: https://develop.svn.wordpress.org/trunk@49222 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 02:27:39 +00:00
Sergey Biryukov 16468a23ac Sitemaps: Center the container for sitemap content.
Props ramiy, swissspidy.
Fixes #50658.

git-svn-id: https://develop.svn.wordpress.org/trunk@49221 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 02:20:31 +00:00
Jonathan Desrosiers 029dd1bbb9 Bundled Themes: Make Twenty Twenty-One the default theme.
After being imported in [49216], Twenty Twenty-One can now be set as the default theme in WordPress.

See #48110.

git-svn-id: https://develop.svn.wordpress.org/trunk@49220 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 02:02:37 +00:00
Sergey Biryukov 9943059356 Help/About: Serve the image on the Freedoms page locally.
Serving the files locally is beneficial for reasons of privacy and speed.

Props garrett-eclipse, pputzer, hellofromTonya.
Fixes #46363.

git-svn-id: https://develop.svn.wordpress.org/trunk@49219 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 02:00:46 +00:00
Sergey Biryukov c7b8b7b974 Help/About: Update Privacy page to include illustration.
This brings some consistency with the Freedoms page.

Follow-up to [43938].

Props melchoyce, garrett-eclipse, hareesh-pillai, ryelle.
Fixes #45395.

git-svn-id: https://develop.svn.wordpress.org/trunk@49218 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 01:45:27 +00:00
Jonathan Desrosiers f3397cc7cf Bundled Themes: Add the theme screenshot for Twenty Twenty-One
Follow up to [49216].

See #51526.

git-svn-id: https://develop.svn.wordpress.org/trunk@49217 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 01:27:09 +00:00
Jonathan Desrosiers 4b90066592 Bundled Themes: Import Twenty Twenty-One, the new default theme for WordPress 5.6.
Welcome to the bundled themes family!

Twenty Twenty-One is a blank canvas for your ideas, making the block editor your best brush.

Theme development to this point has taken place on GitHub. See: https://github.com/WordPress/twentytwentyone/.

Props poena, melchoyce, luminuu, elmastudio, bethsoderberg, williampatton, aristath, jffng, kjellr, jeffikus, audrasjb, fabiankaegy, mukesh27, dingo_d, kellylawrence, acosmin, whyisjake, metodiew, ryelle, nielslange, littlebigthing, mahesh901122, zebulan, kishanjasani, lukecavanagh, scruffian, abhijitrakas, utz119, sudoshreyansh, kau-boy, justinahinon, joostdevalk, bduclos, hareesh-pillai, mager19, rolfsiebers, webmigrates, sresok, guidooffermans, francina, marybaum, hareshlive, navanathbhosale, afercia, richtabor, joyously, sarahricker, nrqsnchz, glauberglauber, sabernhardt, kraftbj, ItsJonQ, joen, CTMartin0, decrecementofeliz, bhautikvirani.
See #51526.

git-svn-id: https://develop.svn.wordpress.org/trunk@49216 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 01:12:25 +00:00
Sergey Biryukov 2a8dae456d General: Remove `noreferrer` from `wp_targeted_link_rel()` and other uses.
When `noopener noreferrer` was originally added in #37941 and related tickets, the `noreferrer` bit was specifically included due to Firefox not supporting `noopener` at the time.

Since `noopener` has been supported by all major browsers for a while, it should now be safe to remove the `noreferrer` attribute from core.

Props Mista-Flo, audrasjb, joostdevalk, jonoaldersonwp, peterwilsoncc, elgameel.
Fixes #49558.

git-svn-id: https://develop.svn.wordpress.org/trunk@49215 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 23:37:53 +00:00
Sergey Biryukov ffbde71040 Themes: Add a return value to `set_theme_mod()` to allow for error handling.
Props latifi, hareesh-pillai.
Fixes #51296.

git-svn-id: https://develop.svn.wordpress.org/trunk@49214 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 22:43:21 +00:00
Sergey Biryukov d86bda1180 Administration: Remove obsolete `.ac_results` class references.
Core does not use the jQuery.suggest plugin since [38797].

Props afercia, hareesh-pillai, garrett-eclipse.
Fixes #40260.

git-svn-id: https://develop.svn.wordpress.org/trunk@49213 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 22:31:08 +00:00
Helen Hou-Sandi 80329c379a Multisite: More specific caching for `get_dirsize`.
Instead of one cache entry for all upload folders for a site on multisite, this now caches for each folder and invalidates that cache based on context. In multisite, this should speed up `get_dirsize` calls since older directories that are much less likely to change will no longer have the size recalculated.

Props janthiel, A5hleyRich, batmoo.
Fixes #19879.


git-svn-id: https://develop.svn.wordpress.org/trunk@49212 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 21:49:58 +00:00
Sergey Biryukov 052ac08385 Pings/Trackbacks: Split `do_all_pings()` into several functions:
* `do_all_pingbacks()`
* `do_all_enclosures()`
* `do_all_trackbacks()`

This allows for the specific removal/replacement of one of more services.

Props dshanske, garrett-eclipse, Mista-Flo, azaozz, hellofromTonya.
Fixes #36576.

git-svn-id: https://develop.svn.wordpress.org/trunk@49211 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 21:14:06 +00:00
Sergey Biryukov bcfa865733 Editor: Expose the `embed` core block on the server.
Props ntsekouras, gziolo.
Fixes #51531.

git-svn-id: https://develop.svn.wordpress.org/trunk@49210 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 20:55:43 +00:00
Sergey Biryukov 98b6f199ef Coding Standards: Fix WPCS issues in [49207].
See #46866.

git-svn-id: https://develop.svn.wordpress.org/trunk@49209 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 20:43:34 +00:00
Sergey Biryukov ab19c66463 Bundled Themes: Declare support for the `html5` feature `navigation-widgets`.
Widgets that output a list of links are now wrapped within `<nav>` elements to improve semantics and accessibility.

The `<nav>` elements are native landmark regions, which helps assistive technology users to navigate through them.

Follow-up to [48349], [49177].

Props hareesh-pillai, justinahinon, afercia, williampatton.
Fixes #51445.

git-svn-id: https://develop.svn.wordpress.org/trunk@49208 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 20:30:47 +00:00
Anthony Burchell ec624193eb Media: Add 'Uploaded to' for individual media items in the media editor.
Adds a link in the media editor showing which post a media item was uploaded to.
Props karmatosed, garrett-eclipse, Mista-Flo, SergeyBiryukov, joemcgill, hellofromTonya.
Fixes #46866.


git-svn-id: https://develop.svn.wordpress.org/trunk@49207 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 20:27:34 +00:00
Sergey Biryukov 8f88adf9d5 Coding Standards: Use more specific checks for `$wpdb->get_row()` results.
If `$wpdb->get_row()` is successful and the `$output` parameter has not been set, the output will be an instance of `stdClass`, so test to confirm that instead of testing against "not null".

This affects:
* `wpmu_validate_user_signup()`
* `wpmu_validate_blog_signup()`

Props jrf.
See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@49206 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 20:18:44 +00:00
Anthony Burchell 1dd1db6ec0 Media: Indicate if media is header video in media library.
This introduces a label to indicate if a piece of media is being used as a video header in the media library.
Props desrosj, Mista-Flo, mikeschroder.
Fixes #42929.


git-svn-id: https://develop.svn.wordpress.org/trunk@49205 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 18:30:36 +00:00
Sergey Biryukov c25f1719bf Widgets: Introduce `before_sidebar` and `after_sidebar` arguments for `register_sidebar()`.
Props deepaklalwani, flixos90, christophherr, dgwyer, markoheijnen, morganestes, audrasjb.
Fixes #19709.

git-svn-id: https://develop.svn.wordpress.org/trunk@49203 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 15:38:11 +00:00
Sergey Biryukov 1ca7bc6718 Embeds: Only catch clicks from the primary mouse button in the click handler, without any modifier keys.
This ensures that Ctrl/Cmd + click to open a link in the embed iframe in a new tab works as expected.

Props timhavinga, garrett-eclipse, smerriman, swissspidy, johnbillion, Mte90, iandunn, azaozz, afercia, audrasjb, SergeyBiryukov.
Fixes #39097.

git-svn-id: https://develop.svn.wordpress.org/trunk@49202 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 13:34:03 +00:00
Sergey Biryukov 4362706c10 Docs: Add a `@deprecated` note to `WP_Community_Events::format_event_data_time()`.
Follow-up to [49146].

See #51130.

git-svn-id: https://develop.svn.wordpress.org/trunk@49201 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-19 13:20:50 +00:00
Peter Wilson 86fc3af215 Canonical: Support multiple post types in `redirect_guess_404_permalink()`.
Prevent `redirect_guess_404_permalink()` from throwing a notice when multiple post types are included in the `post_type` query.

Props junaidbhura.
Fixes #43056.



git-svn-id: https://develop.svn.wordpress.org/trunk@49200 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-18 23:21:03 +00:00
Sergey Biryukov 0392a498db Networks and Sites: Introduce `network_site_info_form` action.
The action fires at the end of the site info form in network admin, and complements the existing `network_site_new_form` action.

Props virgodesign.
Fixes #50704.

git-svn-id: https://develop.svn.wordpress.org/trunk@49199 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-18 21:15:51 +00:00
John Blackbourn 5efc326c34 Media: Add an `image_sideload_extensions` filter to the list of allowed file extensions when sideloading an image from a URL.
Props paulschreiber, hellofromTonya

Fixes #50695


git-svn-id: https://develop.svn.wordpress.org/trunk@49198 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-18 21:04:33 +00:00
John Blackbourn ef8b5078f6 Docs: Further corrections and promotions for docblocks relating to `object` types.
See #50768


git-svn-id: https://develop.svn.wordpress.org/trunk@49197 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-18 20:52:01 +00:00
John Blackbourn 89a402c49c Docs: Improve the docs for the globals that are used in the actions and filters API.
See #50531, #50768


git-svn-id: https://develop.svn.wordpress.org/trunk@49196 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-18 19:17:29 +00:00