Commit Graph

41932 Commits

Author SHA1 Message Date
Dominik Schilling dd353bf815 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/post.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 #50599.

git-svn-id: https://develop.svn.wordpress.org/trunk@48385 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:47:14 +00:00
Dominik Schilling b24fbd088b I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/media.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 #50597.

git-svn-id: https://develop.svn.wordpress.org/trunk@48384 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:12:14 +00:00
Dominik Schilling e39812fe53 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/color-picker.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 #50596.

git-svn-id: https://develop.svn.wordpress.org/trunk@48383 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:07:25 +00:00
Riad Benguella e16565b2d4 Block Editor: Add a script to run Gutenberg end 2 end tests on Core.
The script is not part of CI yet because the job takes 40mn to run
and it's not useful in all PRs/commits.

Fixes #50469.


git-svn-id: https://develop.svn.wordpress.org/trunk@48382 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 16:06:43 +00:00
Timothy Jacobs 9c4288687e REST API: Use new `rest_get_route_for_post()` in the post search handler.
In [48273] the rest_get_route_for_post function was introduced. This simplifies determining the REST API route for any given post object and adds a filter for custom controllers.

Props ravatparmar.
Fixes #50529.


git-svn-id: https://develop.svn.wordpress.org/trunk@48381 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 15:29:22 +00:00
John Blackbourn f4b381b640 Administration: Reinstate the description for the `admin_xml_ns` hook which was accidentally removed in [47771].
See #46015.

git-svn-id: https://develop.svn.wordpress.org/trunk@48380 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:55:51 +00:00
Ella van Durpe 84d3fe2b67 Editor: update packages
Fixes #50589.



git-svn-id: https://develop.svn.wordpress.org/trunk@48379 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:41:35 +00:00
Sergey Biryukov d2ec3ab82d Themes: Allow passing a custom class to post and comment pagination functions.
This affects:
* `get_the_post_navigation()`
* `get_the_posts_navigation()`
* `get_the_posts_pagination()`
* `get_the_comments_navigation()`
* `get_the_comments_pagination()`

Props jfarthing84, markparnell, davidbaumwald, SergeyBiryukov.
Fixes #39378.

git-svn-id: https://develop.svn.wordpress.org/trunk@48378 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:13:37 +00:00
John Blackbourn 5f88132794 Docs: Correct some `@since` entries added in 5.5.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48377 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 14:12:38 +00:00
Riad Benguella 286aae8b64 Administration: Fix remove links color.
Fix regression introduced in [48332] where the specificity
of the admin scheme link colors was higher than the remove link colors.

Props afercia.
Fixes #50536.


git-svn-id: https://develop.svn.wordpress.org/trunk@48376 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:45:30 +00:00
Andrea Fercia ab3ce946c9 Accessibility: Media: Improve accessibility of the status and error messages in the Image Editor.
- improves focus management by moving focus to the notices, if any, or to the first "tabbable" element
- this avoids a focus loss and helps Braille-only and screen magnification users to be aware of the messages
- adds an ARIA role `alert` to all the notices 
- uses `wp.a11y.speak()` to announce messages to assistive technology
- this way, all visual users will see the messages while assistive technology users will get an audible message
- uses `wp.i18n` for translatable strings in `wp-admin/js/image-edit.js`

Props anevins, ryanshoover, antpb, SergeyBiryukov, afercia.
See #20491.
Fixes #47147.


git-svn-id: https://develop.svn.wordpress.org/trunk@48375 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:43:43 +00:00
Sergey Biryukov 41e572858d Plugins: Make sure the HTML ID attributes in plugin action links are unique.
Follow-up to [47588].

Props mukesh27, roytanck, SergeyBiryukov.
Fixes #49916.

git-svn-id: https://develop.svn.wordpress.org/trunk@48374 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 13:41:30 +00:00
Andrea Fercia 337b3295fe Accessibility: Allow post boxes on the Dashboard and Classic Editor pages to be reordered by using the keyboard.
So far, it has been possible to rearrange into a new order the post boxes (also known as "widgets" on the Dashboard and "meta boxes" on the Edit post page) only by using a pointing device, for example a mouse.

This change adds new controls and functionality to allow the boxes to be rearranged also with the keyboard. Additionally, audible messages are sent to the admin ARIA live region to notify screen reader users of the reorder action result.

Props joedolson, anevins, antpb, audrasjb, xkon, MarcoZ, karmatosed, afercia.
Fixes #39074.


git-svn-id: https://develop.svn.wordpress.org/trunk@48373 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 12:58:10 +00:00
Sergey Biryukov 30201a396f Bootstrap/Load: Set `WP_DEBUG` to true by default on `development` environments.
Props johnbillion, kraftbj, Clorith, joostdevalk, dlh.
Fixes #33161.

git-svn-id: https://develop.svn.wordpress.org/trunk@48372 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 12:55:26 +00:00
Riad Benguella f3d3e1df31 Customizer: Adapt the colors to the selected admin scheme colors.
Uses the $highlight-color variable to override the hardcoded colors used in the customizer UI.

Props dlh, joen.
Fixes #50547.


git-svn-id: https://develop.svn.wordpress.org/trunk@48371 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 11:28:12 +00:00
Sergey Biryukov 4e78b0acd9 Themes: Allow template loading functions to pass additional arguments to the template via the `$args` parameter.
This affects:
* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
* `locate_template()`
* `load_template()`

Note: `get_search_form()` already passes additional arguments to the template as of [44956].

Props enrico.sorcinelli, sc0ttkclark, scribu, nacin, wonderboymusic, GeertDD, beatpanda, amaschas, mintindeed, ysalame, caiocrcosta, bigdawggi, julianm, eddiemoya, shawnz, sayedwp, shamai, mboynes, mihai2u, guidobras, Mte90, apedog, stuffradio, overclokk, johnbillion, joyously, afercia, audrasjb, justlevine, SergeyBiryukov.
See #21676.

git-svn-id: https://develop.svn.wordpress.org/trunk@48370 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 11:00:21 +00:00
Sergey Biryukov 3eb2bd9f5b Upload: Introduce `pre_wp_unique_filename_file_list` filter to allow for short-circuiting the `scandir()` call in `wp_unique_filename()`.
This allows plugins to override the file fetching behavior to provide performance improvements for large directories.

Props joehoyle.
Fixes #50587.

git-svn-id: https://develop.svn.wordpress.org/trunk@48369 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 10:18:25 +00:00
Andrea Fercia 7348112444 Accessibility: Improve color contrast for the blue links `:hover` state.
For a number of years, WordPress has been using a `#00a0d2` blue shade for the links `:hover` state. This blue shade doesn't have a sufficient color contrast with the various (too many) background colors used in the admin interface.

The new `#006799` blue shade is part of the official WordPress color palette and does have a sufficient color contrast with most of the admin backgrounds.

Props ryokuhi, audrasjb, joedolson, mapk.
See #47682.


git-svn-id: https://develop.svn.wordpress.org/trunk@48368 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 10:09:23 +00:00
Sergey Biryukov 6bc5b06d20 REST API: Correct the check for `$version` argument in `rest_handle_doing_it_wrong()`.
Move `WP_REST_Response` and `WP_Error` class names out of the translatable string.

Follow-up to [48327], [48361].

See #36271.

git-svn-id: https://develop.svn.wordpress.org/trunk@48367 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 09:54:27 +00:00
Sergey Biryukov b88a906e5e Docs: Miscellaneous DocBlock corrections.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48365 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 09:28:19 +00:00
Sergey Biryukov 67a72d98d9 Docs: Improve DocBlocks in `wp-includes/nav-menu-template.php` per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48364 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 09:26:16 +00:00
Sergey Biryukov 2784518869 Site Health: Correct translator comment for the message displayed after clicking "remind me later" on the admin email confirmation.
Adjust the logic for displaying the message for better readability.

Follow-up to [48359].

See #48333.

git-svn-id: https://develop.svn.wordpress.org/trunk@48363 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 09:19:00 +00:00
Andrea Fercia f76d103e0f Administration: Fix typo in `forms.css` after [46866].
A stray `e` made browsers ignore a CSS ruleset preventing select elements from changing color on hover.

Props ryokuhi.
See #48420.
Fixes #50580.


git-svn-id: https://develop.svn.wordpress.org/trunk@48362 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 07:03:30 +00:00
Jake Spurlock 7166def7ec REST API: Trigger `_doing_it_wrong()` if `wp_send_json()` is used on a REST API request
In addition to triggering the `_doing_it_wrong()` logging, also adds a `X-WP-DoingItWrong` header.

Fixes #36271.

Props rmccue, TimothyBlynJacobs.



git-svn-id: https://develop.svn.wordpress.org/trunk@48361 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 04:59:51 +00:00
Jake Spurlock bbe94ef0fd Administration: Ensure that disabled buttons look disabled.
This change removes the disabled state from the admin scheme specific styles.

Fixes #48709.

Props drw158, SergeyBiryukov, afercia, kennethroberson5556, melchoyce, joedolson, valentinbora, audrasjb, larrach, nrqsnchz, youknowriad.



git-svn-id: https://develop.svn.wordpress.org/trunk@48360 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 04:19:38 +00:00
Jake Spurlock f86dd5c6ce Site Health: Ensure that the user will be notified after a successful snooze action.
After clicking remind me later, the user is shown an admin notification.

Fixes #48333.

Props desrosj, sathyapulse, Clorith, azaozz, audrasjb, afragen, whyisjake.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@48359 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 03:57:17 +00:00
Jake Spurlock 0dcbb5b02d Coding standards: Fix a few phpcs errors to get tests passing.
See [48356], #43517.


git-svn-id: https://develop.svn.wordpress.org/trunk@48358 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 03:53:14 +00:00
Timothy Jacobs 41912bcece REST API: Add support for the uniqueItems keyword.
Props sorenbronsted.
Fixes #48821.


git-svn-id: https://develop.svn.wordpress.org/trunk@48357 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 03:20:34 +00:00
Jake Spurlock abfd9441b7 Taxonomy: Add support for default terms for custom taxonomies.
The new default_term argument is added to `register_taxonomy()` allowing a user to define the default term `name` and optionally `slug` and `description`. 

Fixes #43517.

Props enrico.sorcinelli, SergeyBiryukov, desrosj, davidbaumwald, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48356 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-07 00:53:41 +00:00
Jake Spurlock 4736a74c48 Bundled theme: Ensure appropriate title for author archives for that don't have posts.
Rather then displaying `Author: `, show `Nothing Found`.

Fixes #50421.

Props SGr33n, williampatton, ianbelanger, rebasaurus, priyomukul, virginienacci, audrasjb.



git-svn-id: https://develop.svn.wordpress.org/trunk@48355 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 23:10:45 +00:00
Jake Spurlock 56f5be4984 Coding Standards: Add newlines to package files.
See [48353].



git-svn-id: https://develop.svn.wordpress.org/trunk@48354 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-06 23:01:18 +00:00
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