Commit Graph

42101 Commits

Author SHA1 Message Date
Jake Spurlock
49c3d8e33f Coding standards: Revert the changes from [48352] to package.json and package-lock.json.
These changes were included accidentally. 

See [48352].

Unprops: whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@48353 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 22:07:47 +00:00
Jake Spurlock
a8edf650dd Administration: Move more table strings to sentence casing.
WordPress as a project has moved largely to sentence casing for UI elements in the admin. This commit moves several string$

* Move to trash
* Mark as spam
* Permanently delete comment
* Approve comment
* In response to
* Bulk actions
* Not spam
* Sumitted on
* Delete permanently
* Add media
* Upload files
* Upload images
* Add media
* Bulk select
* Restore from trash
* Search media
* Attachment details
* Create gallery
* Edit gallery
* Cancel gallery
* Add to gallery
* Image details
* Replace image
* Cancel edit
* Edit image
* Choose image
* Select and crop
* Skip cropping
* Crop image
* Audio details
* Replace audio
* Add audio source
* Video details
* Replace video
* Add video source
* Select poster image
* Add subtitles
* Create audio playlist
* Edit audio playlist.
* Cancel audio playlist
* Create video playlist
* Edit video playlist
* Add to video playlist
* Filter media


Fixes #40244.
Props afercia, bhargavbhandari90, rcutmore, webzunft, manojlovic, jeremyfelt, desrosj, lschuyler, SergeyBiryukov, whyisjake. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48352 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 21:50:23 +00:00
Dominik Schilling
aad703799a I18N: Fix typo in [48348].
Props swizzzpidy.
See #50578.

git-svn-id: https://develop.svn.wordpress.org/trunk@48351 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 21:32:15 +00:00
Dominik Schilling
7a59fefb21 I18N: Use wp.i18n for translatable strings in wp-admin/js/tags-box.js and wp-admin/js/tags-suggest.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50579.

git-svn-id: https://develop.svn.wordpress.org/trunk@48350 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 20:58:06 +00:00
Andrea Fercia
9e29ffdd33 Accessibility: Widgets: Add theme support to make widgets output list of links wrapped within a <nav> element.
Widgets that output list of links can now be wrapped within `<nav>` elements to improve semantics and accessibility.

The `<nav>` elements are also native landmark regions, which helps assistive technology users to navigate through them. Themes can opt-in to this new behavior by declaring support for the new `html5` feature `navigation-widgets`.

Props joedolson, simonjanin, audrasjb, afercia.
Fixes #48170.


git-svn-id: https://develop.svn.wordpress.org/trunk@48349 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 20:42:14 +00:00
Dominik Schilling
538ba85172 I18N: Use wp.i18n for translatable strings in wp-admin/js/edit-comments.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50578.

git-svn-id: https://develop.svn.wordpress.org/trunk@48348 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 20:15:46 +00:00
Dominik Schilling
0d00b776ec I18N: Use wp.i18n for translatable strings in wp-admin/js/tags.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50577.

git-svn-id: https://develop.svn.wordpress.org/trunk@48347 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 19:45:04 +00:00
Dominik Schilling
70cb267fde I18N: Use wp.i18n for translatable strings in wp-admin/js/theme-plugin-editor.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Fixes #50576.

git-svn-id: https://develop.svn.wordpress.org/trunk@48346 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 19:33:54 +00:00
Jonathan Desrosiers
b84d8e4d09 Coding Standards: Correct two coding standards issues introduced in [48277] and [48334].
See #50504, #50550.

git-svn-id: https://develop.svn.wordpress.org/trunk@48345 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 19:21:33 +00:00
Jonathan Desrosiers
bf7ba4dc5b Docs: Correct instances of “auto update” with “auto-update” for consistency.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48344 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 19:13:26 +00:00
Jonathan Desrosiers
b9d9968ae9 Docs: Correct typo introduced in [48288].
See #42775.

git-svn-id: https://develop.svn.wordpress.org/trunk@48343 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 19:08:22 +00:00
Riad Benguella
fcad7cfb90 Administration: Adapts the secondary buttons colors to the admin schemes.
The admin schemes that don't meet the contrast guidelines are excluded from this change.

Props mapk, michaelarestad, mcsf, ocean90.
Closes #50537.


git-svn-id: https://develop.svn.wordpress.org/trunk@48342 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 18:58:52 +00:00
Sergey Biryukov
708e6de8ea Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
See #50573.

git-svn-id: https://develop.svn.wordpress.org/trunk@48341 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 18:20:32 +00:00
Andrea Fercia
0fa6c2190a Accessibility: Administration: Improve the sortable postboxes areas on the Dashboard and Classic Editor pages.
- makes the postboxes areas in the Dashboard visible also on large screens 
- uses a more meaningful text when all postboxes areas are empty instead of "Drag boxes here"
- restores the ability to drag boxes to the "advanced" area in the Classic Editor page
- makes the postboxes areas in the Classic Editor page visible while dragging so that users have a clue what the available areas are
- improves the color contrast of the postboxes areas while dragging
- uses `wp.i18n` for translatable strings in `wp-admin/js/postbox.js`

Props xkon, karmatosed, audrasjb, ocean90, joedolson, afercia, azaozz.
See #20491.
Fixes #49288, #47541.


git-svn-id: https://develop.svn.wordpress.org/trunk@48340 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 18:01:55 +00:00
Sergey Biryukov
b0039629b3 Coding Standards: Fix JSHint issue in js/_enqueues/lib/auth-check.js
See #49573.

git-svn-id: https://develop.svn.wordpress.org/trunk@48339 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 16:25:24 +00:00
Sergey Biryukov
a45a4f98ef Tests: Add some assertions to PDF tests for better debugging.
Props enrico.sorcinelli.
See #50573.

git-svn-id: https://develop.svn.wordpress.org/trunk@48338 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 16:13:26 +00:00
Andrew Ozz
9f8a9a3239 Heartbeat: Do not disable the login prompts when the user needs to log in again but has closed the log in modal. Add a 5 minutes timeout before asking them to log in again.
Props dsixinetu, adamsilverstein, azaozz.
Fixes #49573.

git-svn-id: https://develop.svn.wordpress.org/trunk@48337 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 16:12:24 +00:00
Riad Benguella
46971a83ec Block Editor: Requires title and content when registering block patterns.
Props poena.
See #50550.


git-svn-id: https://develop.svn.wordpress.org/trunk@48336 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 12:02:45 +00:00
Riad Benguella
454ef1f091 Block Editor: Remove the Testimonials block pattern.
This ensures we have the same patterns used in the Gutenberg plugin.

Props poena.
See #50550.


git-svn-id: https://develop.svn.wordpress.org/trunk@48335 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 11:17:45 +00:00
Riad Benguella
388dd08736 Block Editor: Add the initial set of block patterns.
Included patterns:

text-two-columns
two-buttons
two-images
text-two-columns-with-images
text-three-columns-buttons
large-header
large-header-paragraph
three-buttons
quote
testimonials

Props mcsf, nrqsnchz.
See #50550.


git-svn-id: https://develop.svn.wordpress.org/trunk@48334 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 10:48:35 +00:00
Sergey Biryukov
b82c472f24 Tests: Correct hardcoded "3 months ago" assertion in tests/rest-api/rest-block-directory-controller.php.
Now that more than 3 months have passed since 2020-03-23, this was causing test failures.

Follow-up to [48242].

See #50321.

git-svn-id: https://develop.svn.wordpress.org/trunk@48333 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 09:49:07 +00:00
Riad Benguella
8119c5ed77 Administration: Fix link colors for admin schemes that personalize it using the $link SASS variable.
The new "moderne" admin scheme color personalizes the link color using the $link SASS variable.
The link color doesn't apply consistently in the admin to all links, especiall button links.

Fixes #50536.


git-svn-id: https://develop.svn.wordpress.org/trunk@48332 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 09:23:04 +00:00
Sergey Biryukov
818de7d83e Coding Standards: Fix WPCS issues in tests/media.php.
See #50543.

git-svn-id: https://develop.svn.wordpress.org/trunk@48331 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 09:17:15 +00:00
Sergey Biryukov
13dee8f174 Privacy: Simplify the logic for updating the meta values for personal data export requests from absolute to relative paths.
Follow-up to [48127].

See #44038.

git-svn-id: https://develop.svn.wordpress.org/trunk@48330 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 00:32:15 +00:00
Andrew Ozz
27ccafd0e9 Media:
- Introduce `wp_image_file_matches_image_meta()` utility function to check whether the image meta (retrieved by attachment ID) matches an image path or URI. A mismatch may happen in some cases, for example after the posts have been exported from one website and imported in another.
- Add unit tests for the new function.
- Improve `wp_image_src_get_dimensions()` a bit and use the new function to prevent these edge cases.

Fixes #50543.

git-svn-id: https://develop.svn.wordpress.org/trunk@48329 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 23:30:36 +00:00
Sergey Biryukov
530eedb538 Query: Make sure the found_posts property of WP_Query is always an integer, to match the documented type.
This makes the property consistent with similar properties of other classes:
* `WP_Comment_Query::$found_comments`
* `WP_Network_Query::$found_networks`
* `WP_Site_Query::$found_sites`
* `WP_User_Query::$total_users`

Props birgire, PressLabs.
Fixes #42469.

git-svn-id: https://develop.svn.wordpress.org/trunk@48328 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 21:32:26 +00:00
Sergey Biryukov
09921a5283 Plugins: Consistently use an empty string as the default value for $replacement and $message parameters in:
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`

This matches the documented type of `string` for these parameters and removes unnecessarily strict `! is_null()` checks.

Follow-up to [46792].

Props jignesh.nakrani, renathoc, SergeyBiryukov.
Fixes #49698.

git-svn-id: https://develop.svn.wordpress.org/trunk@48327 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 21:07:48 +00:00
Sergey Biryukov
b1b1b08e43 Plugins: Use include_once instead of include in uninstall_plugin(), in case the plugin file is already included.
Props valchovski, pcfreak30.
Fixes #47796.

git-svn-id: https://develop.svn.wordpress.org/trunk@48326 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 20:30:18 +00:00
Sergey Biryukov
5c41e3af90 Docs: Fix typos in comments in tests/dependencies/jquery.php.
Props hareesh-pillai.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48325 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 20:27:52 +00:00
Andrew Ozz
1c8ebd5da6 Build/Test Tools: update PHPUnit tests after [48323]. Disable and keep the specific jQuery Migrate dependency tests for use in WP 5.6.
See #37110.

git-svn-id: https://develop.svn.wordpress.org/trunk@48324 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 19:22:24 +00:00
Andrew Ozz
ca54987591 External Libraries: First step of updating jQuery. Disable jQuery Migrate 1.4.1, keep jQuery at 1.12.4-wp, and UI at 1.11.4. Also keep the jquery-core script handle for full backwards compatibility.
Props jorbin, adamsilverstein, westonruter, retlehs, pento, onokazu, galbaras, netweb, zakkath, dmethvin, LittleBigThing, markgoho, iandunn, remzicavdar, bigcloudmedia, jacklinkers, levdbas, a4jpcom, azaozz.

See #37110.

git-svn-id: https://develop.svn.wordpress.org/trunk@48323 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 18:26:24 +00:00
Sergey Biryukov
b5b613f8bb XML-RPC: Explicitly unset the reference to the parser resource after calling xml_parser_free() to avoid memory leaks in PHP 7.0.0 or higher.
Props procifer, ayeshrajans.
Fixes #49700.

git-svn-id: https://develop.svn.wordpress.org/trunk@48322 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 15:20:16 +00:00
Sergey Biryukov
e3df130089 Options, Meta APIs: Introduce register_setting and unregister_setting actions.
Props Howdy_McGee, Pionect.
Fixes #37245.

git-svn-id: https://develop.svn.wordpress.org/trunk@48321 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 15:05:02 +00:00
Sergey Biryukov
fcafa02a04 Docs: Improve documentation for various option functions.
Props andfinally, david.binda, SergeyBiryukov.
Fixes #49566.

git-svn-id: https://develop.svn.wordpress.org/trunk@48320 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 14:44:37 +00:00
Dominik Schilling
0df921c96d Administration: Add delete_count to wp_removable_query_args().
It's a single-use URL parameter that does not need to be passed to canonical URLs in the admin.

Props opurockey.
Fixes #50464.

git-svn-id: https://develop.svn.wordpress.org/trunk@48319 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 13:55:46 +00:00
Dominik Schilling
d65c0a770c Posts: Provide a HiDPI version for the avatar used in post locked dialogs.
Props wpdesk, audrasjb, ocean90.
Fixes #39633.

git-svn-id: https://develop.svn.wordpress.org/trunk@48318 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 12:58:20 +00:00
Sergey Biryukov
42d51e4e2e Tests: Remove ja_JP locale from Tests_DB::test_locale_floats().
This test is only relevant for locales using a comma as a decimal separator, while `ja_JP` uses a dot.

Props gh640, johnjamesjacoby, SergeyBiryukov.
Fixes #49690.

git-svn-id: https://develop.svn.wordpress.org/trunk@48317 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 12:50:47 +00:00
Sergey Biryukov
ff1bf05b69 Administration: Bring the update nag in line with other admin notices.
In addition to more consistent display, this gives it a visible border on the About page.

Props desrosj, nikhilbhansi, afercia, SergeyBiryukov.
Fixes #50372.

git-svn-id: https://develop.svn.wordpress.org/trunk@48316 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 11:55:14 +00:00
Dominik Schilling
2a22dcf8a6 Multisite: Delete the signup entry when a user is deleted from the database.
When a user has registered with incorrect data and got the account deleted immediately, it currently wasn't possible to register with the same login or email address again due to the existing signup entry. They had to wait for two days until the entry gets automatically deleted. Now the associated signup entry gets deleted as part of the account deletion.

Fixes #43232.

git-svn-id: https://develop.svn.wordpress.org/trunk@48315 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 11:19:35 +00:00
Sergey Biryukov
f5dcde26e5 Taxonomy: Introduce saved_term and saved_{$taxonomy} actions to complement created_term and created_{$taxonomy}.
This allows for hooking into both the create and update events with a single callback, in the same way that is already possible for posts via the `save_post` and `save_post_{$post->post_type}` actions.

Props dlh.
Fixes #48416.

git-svn-id: https://develop.svn.wordpress.org/trunk@48314 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 11:11:46 +00:00
Dominik Schilling
d0f4f20df5 Users: Pass the WP_User object to the wpmu_delete_user, delete_user, and deleted_user actions.
See #43232.

git-svn-id: https://develop.svn.wordpress.org/trunk@48313 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 10:55:18 +00:00
Sergey Biryukov
2fba7f5a68 Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments.
Props dingo_d.
See #50546.

git-svn-id: https://develop.svn.wordpress.org/trunk@48312 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 10:38:24 +00:00
Dominik Schilling
16dc354833 Administration: Make all color schemes available when running from /src.
To run WordPress from /src you have to use the `--dev` flag which also builds the color scheme stylesheets thus the restriction is no longer required.

See #44492.
Fixes #50558.

git-svn-id: https://develop.svn.wordpress.org/trunk@48311 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 10:38:18 +00:00
Sergey Biryukov
34730d2ea0 Post Thumbnails: Change the return value of get_post_thumbnail_id() for a non-existing post to false instead of an empty string.
This further makes the function more consistent with `get_the_ID()` or `wp_get_post_parent_id()`, both returning `false` for a non-existing post.

Additionally, document that `get_post_thumbnail_id()` returns `0` if the thumbnail image is not set.

Follow-up to [47160].

Props theMikeD, dingo_d, netpassprodsr, SergeyBiryukov.
Fixes #49832. See #40096.

git-svn-id: https://develop.svn.wordpress.org/trunk@48310 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 10:15:40 +00:00
Andrea Fercia
2d36a7640a Docs: Replace @returns tag in media/views/attachment/details.js with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead.

Follow-up to [46800], [48232].
See #49572.


git-svn-id: https://develop.svn.wordpress.org/trunk@48309 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 08:01:51 +00:00
Timothy Jacobs
8082c60b5f REST API: Remove specific multi-type schema handling from the themes controller.
Multi-type schema handling was improved in [48306]. In particular, it now allows for sanitizing a multi-typed value that wouldn't validate. Removing this handling will make 3rd party registered theme features more robust.

Fixes #50562.


git-svn-id: https://develop.svn.wordpress.org/trunk@48308 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 01:04:30 +00:00
Timothy Jacobs
798cd1e20b REST API: Correct the return type of rest_sanitize_value_from_schema.
Fixes #45486.
Props birgire, Jean-David, mukesh27, priyankkpatel.


git-svn-id: https://develop.svn.wordpress.org/trunk@48307 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 00:17:54 +00:00
Timothy Jacobs
205eb1abc9 REST API: Make multi-typed schemas more robust.
A multi-type schema is a schema where the `type` keyword is an array of possible types instead of a single type. For instance, `[ 'object', 'string' ]` would allow objects or string values.

In [46249] basic support for these schemas was introduced. The validator would loop over each schema type trying to find a version that matched. This worked for valid values, but for invalid values it provided unhelpful error messages. The sanitizer also had its utility restricted.

In this commit, the validators and sanitizers will first determine the best type of the passed value and then apply the schema with that set type. In the case that a value could match multiple types, the schema of the first matching type will be used.

To maintain backward compatibility, if unsupported schema types are used, the value will always pass validation. A doing it wrong notice is issued in this case.

Fixes #50300.
Props pentatonicfunk, dlh, TimothyBlynJacobs.


git-svn-id: https://develop.svn.wordpress.org/trunk@48306 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-05 00:13:37 +00:00
Sergey Biryukov
83f8654283 Login and Registration: Set a more appropriate page title for the "check your email" step of new user registration or password reset.
Follow-up to [48304].

See #40605, #41514.

git-svn-id: https://develop.svn.wordpress.org/trunk@48305 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 22:01:08 +00:00
Sergey Biryukov
319f864625 Login and Registration: Hide the login form on the "check your email" step of new user registration or password reset.
This aims to reduce some confusion and make it clearer that the email should be checked before attempting to log in right away.

Props rianrietveld, pratik028, bdbch, johnbillion, hankthetank, yashrs, williampatton, audrasjb, bmartinent, florianatwhodunit, henry.wright, birgire, SergeyBiryukov.
Fixes #40605, #41514.

git-svn-id: https://develop.svn.wordpress.org/trunk@48304 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 21:56:54 +00:00