Commit Graph

307 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Sergey Biryukov c9b4885dc8 Docs: Correct spelling of "backward compatibility" per the Core Contributor Handbook glossary.
Follow-up to [45232].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48302 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 20:40:21 +00:00
Sergey Biryukov 719cf5650a Coding Standards: Wrap some long lines in `wp-admin/js/site-health.js` per the JS coding standards for better readability.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48301 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 19:54:39 +00:00
Sergey Biryukov 48df288566 Docs: Replace `@returns` tag in `wp-admin/js/post.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@48298 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 19:07:38 +00:00
Sergey Biryukov 39d4214826 Coding Standards: Rename functions in `wp-admin/js/site-health.js` per the JS coding standards.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48297 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-04 19:07:10 +00:00
Andrew Ozz 1285255381 Media: Show an error message when a `.heic` file is uploaded that this type of files cannot be displayed in a web browser and suggesting to convert to JPEG. The message is shown by using filters, plugins that want to handle uploading of `.heic` files can remove it.
Props mattheweppelsheimer, mikeschroder, jeffr0, andraganescu, desrosj, azaozz.
Fixes #42775.

git-svn-id: https://develop.svn.wordpress.org/trunk@48288 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-03 23:13:30 +00:00
Dominik Schilling 5b270df345 I18N: Use `wp.i18n` for translatable strings in `wp-includes/js/wp-auth-check.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 #50553.

git-svn-id: https://develop.svn.wordpress.org/trunk@48285 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-03 19:03:23 +00:00
Sergey Biryukov 5714ef31c0 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/privacy-tools.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, afercia.
See #20491.
Fixes #50535.

git-svn-id: https://develop.svn.wordpress.org/trunk@48274 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-02 11:09:23 +00:00
Dominik Schilling 75b61d650a I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/user-profile.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 #50527.

git-svn-id: https://develop.svn.wordpress.org/trunk@48270 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 20:36:32 +00:00
Dominik Schilling 06f788f622 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/common.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 #50526.

git-svn-id: https://develop.svn.wordpress.org/trunk@48267 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 19:48:30 +00:00
Dominik Schilling ad03cf3f72 I18N: Use `wp.i18n` for translatable strings in `wp-includes/js/wp-pointer.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 #50525.

git-svn-id: https://develop.svn.wordpress.org/trunk@48266 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 19:28:14 +00:00
Andrea Fercia f3f7b77522 Accessibility: Media: Fix the Image Editor mismatching keyboard focus order and visual reading order.
Swaps the DOM order of the two main columns within the admin Image Editor.

When the sequence in which content is presented affects its meaning and the navigation sequences affect meaning or operation, visual order and DOM order must match. See WCAG 2.1 Success Criterion 1.3.2 Meaningful Sequence and Success Criterion 2.4.3 Focus Order.

Props sabernhardt, anevins, audrasjb, afercia.
Fixes #47136.


git-svn-id: https://develop.svn.wordpress.org/trunk@48265 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-01 14:27:18 +00:00
Andrea Fercia 0445f4b95c Accessibility: Privacy: Accessibility improvements for the Privacy Policy Guide page.
Improves accessibility of the "Copy this section" button and "Return to Top" link:
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- simplifies the button text by removing the redundant visually hidden text
- fixes the mismatching visual and DOM order of the Copy button and the "Return to Top" link 
- improves the "Return to Top" links by providing real page fragment identifiers, when possible
- hides the "Return to Top" up arrow from assistive technologies
- minor coding standards

Props afercia, garrett-eclipse.
See #48463, #50322.
Fixes #50335.


git-svn-id: https://develop.svn.wordpress.org/trunk@48234 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-30 13:54:40 +00:00
Andrea Fercia 2df56667b3 Accessibility: Site Health: Improve the "Copy site info" button accessibility.
- avoids a focus loss when clicking the "Copy site info" button
- uses `setTimeout()` and `clearTimeout()` to properly handle the "Copied!" text
- minor JavaScript coding standards

Props audrasjb, Clorith, afercia.
See #48463, #50335.
Fixes #50322.


git-svn-id: https://develop.svn.wordpress.org/trunk@48233 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-30 13:24:12 +00:00
Andrea Fercia 36a39ff333 Accessibility: Media: Add a "Copy URL" button to the attachment File URL fields.
For a number of years, various screens in the WordPress admin provided users with a readonly input field to copy the attachment file URL. Manually copying from a readonly field is an annoying task at best even for mouser users. It's a usability and accessibility issue at the same time. 
These fields now have a new "Copy URL" button that is easy to use and accessible to everyone.

Props theolg, markdubois, vabrashev, sajjad67, xkon, nrqsnchz, melchoyce, audrasjb, afercia.
See #41612, #50322, #50335.
Fixes #48463.


git-svn-id: https://develop.svn.wordpress.org/trunk@48232 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-30 13:14:05 +00:00
Sergey Biryukov 52f139829c Customize: Ensure the default message in `LockedNotification` is set to a string instead of `null`.
This avoids a JS error when passing the message to `wp.a11y.speak()` when showing the "changeset is locked" overlay to prevent two users from editing the same changeset simultaneously.

Props dlh.
Fixes #50500.

git-svn-id: https://develop.svn.wordpress.org/trunk@48210 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-29 09:47:11 +00:00
Sergey Biryukov 9de597ea9f Docs: Replace "AJAX" with "Ajax" in DocBlocks and comments, per the spelling glossary.
Props mukesh27, sabernhardt, SergeyBiryukov.
Fixes #50064.

git-svn-id: https://develop.svn.wordpress.org/trunk@48168 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-25 12:41:36 +00:00
Sergey Biryukov e65d19b9ed Coding Standards: Reformat some long `apply_filters_deprecated()` and `do_action_deprecated()` calls for better readability.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@48167 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-25 12:04:05 +00:00
Andrew Ozz 67839d5a62 TinyMCE: Update to 4.9.10. Changelog: https://www.tiny.cloud/docs-4x/changelog/#version4910april232020.
Props hareesh-pillai, azaozz.
Fixes #50431.

git-svn-id: https://develop.svn.wordpress.org/trunk@48158 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-24 22:04:36 +00:00
Jonathan Desrosiers 19c9963d9d General: Rename `(add|remove)_option_allowed_list()` to `(add|remove)_allowed_option()`.
The new names make the purpose more clear. It also adds consistency with the `$allowed_options` global variable.

Also in this change, the `wp-deprecated` dependency has been removed from the password strength meter in favor of a `window.console.log()` call to avoid adding 3 dependencies for one deprecated notice.

Props SergeyBiryukov, ocean90, desrosj
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48142 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-23 18:53:00 +00:00
Jake Spurlock 5acb95916f Administration: Remove unnecessary !important CSS rules from common.css
Fixes #47569.

Props foack, SergeyBiryukov, davidbaumwald, sabernhardt, isabel_brison, audrasjb. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48129 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 23:59:04 +00:00
Jonathan Desrosiers 517c27e297 Docs: Small inline documentation corrections following [48121].
Also, remove the `version` argument from the `wp.deprecated()` call in `password-strength-meter.js`. This argument is for specifying the version a feature will be removed, not when the feature was removed.

Props hareesh-pillai.
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48124 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 19:07:57 +00:00
Jonathan Desrosiers e26394bb2d General: Remove “whitelist” and “blacklist” in favor of more clear and inclusive language.
“The WordPress open source community cares about diversity. We strive to maintain a welcoming environment where everyone can feel included.”

With this commit, all occurrences of “whitelist” and “blacklist” (with the single exception of the `$new_whitelist_options` global variable) are removed. A new ticket has been opened to explore renaming the `$new_whitelist_options` variable (#50434).

Changing to more specific names or rewording sentences containing these terms not only makes the code more inclusive, but also helps provide clarity. These terms are often ambiguous. What is being blocked or allowed is not always immediately clear. This can make it more difficult for non-native English speakers to read through the codebase.

Words matter. If one contributor feels more welcome because these terms are removed, this was worth the effort.

Props strangerstudios, jorbin, desrosj, joemcgill, timothyblynjacobs, ocean90, ayeshrajans, davidbaumwald, earnjam.
See #48900, #50434.
Fixes #50413.

git-svn-id: https://develop.svn.wordpress.org/trunk@48121 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-22 17:24:34 +00:00
Andrea Fercia 98d22d5d3d I18N: Restore the "Error:" prefix for error messages.
Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].

Fixes #47656.


git-svn-id: https://develop.svn.wordpress.org/trunk@48115 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-21 13:58:46 +00:00
Sergey Biryukov 738144bd05 Docs: Remove extra spaces from `@param` tags.
Per the documentation standards, `@param` tags should be aligned with each other, but not with the `@return` tag.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48110 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:57:00 +00:00
Sergey Biryukov c682da9190 Docs: Use a hyphen with the "non" prefix in a more consistent way.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48106 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:13:58 +00:00
Sergey Biryukov 5e2ef3d937 Docs: Capitalize "ID", when referring to a post ID, term ID, etc. in a more consistent way.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48104 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-20 12:00:07 +00:00
Andrew Ozz 52ce85d0a5 Plugins and Themes Auto-Updates:
- Fix displaying of errors on the Themes screen.
- Correct the classes used for the error messages, and use `notice-alt` as notices are mostly shown on a white background.

Props afercia, azaozz.
Fixes #50405.

git-svn-id: https://develop.svn.wordpress.org/trunk@48092 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-19 16:49:58 +00:00
Andrea Fercia 50ece6d31c I18N: Remove the "Error:" prefix from error messages.
For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.

Also, revises some of these messages to improve clarity and removes HTML from translatable strings.

Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb. 
See #47003, #43037, #42945, #15887.
Fixes #47656.


git-svn-id: https://develop.svn.wordpress.org/trunk@48059 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 15:33:37 +00:00
Jake Spurlock cbc71bb1a1 Administration: Remove `wp-auth-check` from the Heartbeat API.
As of [27153], wp-auth-check is returned on all heartbeats without the need for data from client-side. This also means that the timing and scheduling of this request data is ineffectual.

Fixes #50305.

Props dsixinetu, azaozz, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@48056 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-16 07:07:54 +00:00
Jonathan Desrosiers dfcbff2db0 Emoji: Upgrade Twemoji to version 13.0.0.
🥸

Props kraftbj, desrosj, otto42.
Fixes #50148.

git-svn-id: https://develop.svn.wordpress.org/trunk@48048 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-15 18:02:14 +00:00
Sergey Biryukov 9c0fd94558 Coding Standards: Use strict comparison in `js/_enqueues/lib/ajax-response.js`.
Props ankitmaru.
Fixes #50320.

git-svn-id: https://develop.svn.wordpress.org/trunk@48040 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-14 11:26:22 +00:00
Sergey Biryukov d0268ece09 Themes: Ensure the theme slug is set before checking if the theme is installed or active.
This fixes an issue with every installed theme being marked as active on Themes screen.

The slug is set on Add Themes screen, but not on Themes.

Follow-up to [47924].

Props BackuPs, mukesh27, SergeyBiryukov.
Fixes #50381. See #50334.

git-svn-id: https://develop.svn.wordpress.org/trunk@48037 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-13 14:24:30 +00:00
Sergey Biryukov 823b703fe9 Themes: Show a disabled "Activated" button instead of "Activate" for the active theme on Add Themes screen.
Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen.

Props afercia, SergeyBiryukov.
Fixes #50334.

git-svn-id: https://develop.svn.wordpress.org/trunk@47924 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-08 18:14:19 +00:00
Sergey Biryukov 112c2c456a Plugins: Make the message displayed when no plugins are installed more concise.
Props johnjamesjacoby, Presskopp.
Fixes #42336.

git-svn-id: https://develop.svn.wordpress.org/trunk@47894 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-03 10:49:45 +00:00
Dominik Schilling 9bea5b3444 I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/updates.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 #50235.

git-svn-id: https://develop.svn.wordpress.org/trunk@47884 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 21:39:30 +00:00
Andrew Ozz 5263a96a4c Plugins and Themes Auto-Updates: update the state of the auto-update link on the themes screen after successfully saving the setting.
Props desrosj, pbiron, azaozz.
Fixes #50291.

git-svn-id: https://develop.svn.wordpress.org/trunk@47883 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 20:51:10 +00:00
Jake Spurlock eb79d7f1ee Security: Add user interface to auto-update themes and plugins.
Building on core update mechanisms, this adds the ability to enable automatic updates for themes and plugins to the WordPress admin. 

Fixes: #50052.
Props: afercia, afragen, audrasjb, azaozz, bookdude13, davidperonne, desrosj, gmays, gmays, javiercasares, karmatosed, knutsp, mapk, mukesh27, netweb, nicolaskulka, nielsdeblaauw, paaljoachim, passoniate, pbiron, pedromendonca, whodunitagency, whyisjake, wpamitkumar, and xkon.


git-svn-id: https://develop.svn.wordpress.org/trunk@47835 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 18:47:24 +00:00
Andrea Fercia cdd8b92ea6 Accessibility: Media: Hide the invisible "file input" on media views from assistive technologies.
The file input button is visually hidden, but was announced by screen readers in workflows unrelated to file uploads.
It is now hidden from assistive technologies by the means of an `aria-hidden` attribute, as its CSS display property must not be changed to make sure it still works on old browsers.

See #49753.
Fixes #47611.


git-svn-id: https://develop.svn.wordpress.org/trunk@47834 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 13:31:32 +00:00
Sergey Biryukov 36e4db6b01 Media: Expose media grid frame via `wp-media-grid-ready` trigger for easier customization.
Props soulseekah.
Fixes #50185.

git-svn-id: https://develop.svn.wordpress.org/trunk@47807 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-16 17:23:31 +00:00
Dominik Schilling 3d31284c5e Administration: Remove any CSS related to Internet Explorer versions 6 – 10.
In WordPress 3.2 support for IE6 was dropped, IE7 followed a few versions later. With the 4.8 release, WordPress officially ended support for Internet Explorer versions 8, 9, and 10. Yet, we still have shipped CSS for the unsupported IE versions....until now! Goodbye to ie.css and star hacks!

* Removes ie.css and `ie` style handle.
* Removes IE specific class names and any related CSS.
* Drops support for IE8 and older in `wp_customize_support_script()`.
* Updates compatibility mode for CSS minification to `ie11`.

Props ayeshrajans, isabel_brison, afercia, netweb, peterwilsoncc, ocean90.
Fixes #17232, #46015.

git-svn-id: https://develop.svn.wordpress.org/trunk@47771 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-06 20:13:38 +00:00
Sergey Biryukov d5df031e6f Privacy: Add an indication when the Copy action in Privacy Policy Guide is complete.
This adds a "Copied!" text near the "Copy this section to clipboard" button to provide direct feedback that the action was completed.

Props garrett-eclipse, nickylimjj, xkon, desrosj, birgire.
Fixes #44588.

git-svn-id: https://develop.svn.wordpress.org/trunk@47572 602fd350-edb4-49c9-b593-d223f7449a82
2020-04-12 14:24:38 +00:00
Robert Anderson 251fd685dd Comments: Fix title not updating when replying to a comment
When replying to an existing comment, the comment form is moved to below the
existing comment with JS, but the form heading was not being updated. This
fixes the issue by introducing a new data-attribute to the reply link with the
correct heading string, and applying that string to the heading when the form
is moved.

Props isabel_brison, azaozz, peterwilsoncc.
Fixes #38009.


git-svn-id: https://develop.svn.wordpress.org/trunk@47506 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-25 04:53:06 +00:00
Sergey Biryukov 60f78cd845 Privacy: Prevent unexpected scrolling when clicking the "Copy this section to clipboard" button on Privacy Policy Guide screen.
Props garrett-eclipse, birgire, davidbaumwald, pbiron.
Fixes #49540.

git-svn-id: https://develop.svn.wordpress.org/trunk@47420 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-03 17:49:53 +00:00
John Blackbourn b20dd081ba Editor: Revert a fix for incorrect usage of ID attributes on custom fields.
This reverts [47222] due to compatibility issues with plugins which are using the `#poststuff` selector.

See #46964

git-svn-id: https://develop.svn.wordpress.org/trunk@47410 602fd350-edb4-49c9-b593-d223f7449a82
2020-03-03 00:35:41 +00:00
Sergey Biryukov 5f23c79b1d Privacy: Make the progress indicator for export and erasure visible even if not hovered over.
Follow-up to [47246].

Props pbiron, garrett-eclipse.
Fixes #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47395 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-29 23:43:57 +00:00
Sergey Biryukov 196859f90f Customize: When a menu item is removed from the menu, uncheck its source item on the available items panel.
Props donmhico, garrett-eclipse, audrasjb.
Fixes #46830.

git-svn-id: https://develop.svn.wordpress.org/trunk@47356 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-25 11:12:18 +00:00
Sergey Biryukov c2316edc3a Coding Standards: Add missing braces to `if` conditions and use strict comparison in `js/_enqueues/wp/media/editor.js`.
Props ankitmaru.
Fixes #49317.

git-svn-id: https://develop.svn.wordpress.org/trunk@47349 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-23 08:56:44 +00:00
Sergey Biryukov 96f845d1a7 Menus: Restore the title of the currently active/expanded menu item when clicking "Cancel" after editing.
Other inputs are already restored to their previous values in that case.

Props Girishpanchal, nilamacharya, JoshuaWold, welcher, SergeyBiryukov.
Fixes #43031.

git-svn-id: https://develop.svn.wordpress.org/trunk@47294 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-16 06:25:54 +00:00
Andrea Fercia 5866986d74 Media: Fix bottom spacing on various Media Modal elements for non-webkit browsers.
Implementation of bottom padding in overflow content differs across browsers. See https://github.com/w3c/csswg-drafts/issues/129. To make bottom spacing consistent across browsers there's the need for an alternate CSS method.
- uses a CSS `after` pseudo element or simply a bottom margin to reserve some bottom spacing
- removes a couple leftovers from [40428]
- fixes an annoying visual glitch where the media modal content is visible behind the bottom toolbar border

Props sabernhardt, afercia.
See #40152.
Fixes #48378.


git-svn-id: https://develop.svn.wordpress.org/trunk@47266 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:30:13 +00:00
Sergey Biryukov f26d4d3735 Widgets: Prevent currently active wide widget controls from being partially covered by another widget's controls.
The currently active widget controls should always be displayed on top.

Props audrasjb, fervillz, rinkuyadav999, jaydeep23290, ashokrd2013, melchoyce, pento, westonruter, SergeyBiryukov.
Fixes #42001.

git-svn-id: https://develop.svn.wordpress.org/trunk@47263 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 15:24:47 +00:00
Anthony Burchell 08b3c1d123 Media: Reset aspect ratio constraints when width and height fields fail numeric validation.
Props TBschen, valentinbora.
Fixes #49073.


git-svn-id: https://develop.svn.wordpress.org/trunk@47262 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 04:38:55 +00:00
Sergey Biryukov 0c07311e95 Coding Standards: Fix JSHint issues in [47246].
See #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47248 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 21:36:53 +00:00
Sergey Biryukov a6a02eaca7 Privacy: Give progress indication for export and erasure.
This adds a progress indicator for "Download Personal Data" and "Erase Personal Data" row actions, which can take a while with a lot of data.

Props garrett-eclipse, allendav, dominic_ks, xkon, karmatosed, birgire.
Fixes #44264.

git-svn-id: https://develop.svn.wordpress.org/trunk@47246 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 20:17:58 +00:00
Sergey Biryukov 023d4b2796 Administration: Capitalize `Trash` consistently in various messages and comments.
When used as a noun referring to the "virtual" place, `Trash` should be capitalized.

Props garrett-eclipse, aandrewdixon, Presskopp.
Fixes #45317.

git-svn-id: https://develop.svn.wordpress.org/trunk@47233 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 04:10:09 +00:00
Andrew Ozz 6fd606d236 Media: Ensure imgareaselect.js is not initialized twice for the same image. May happen when uploading an image into a post and then clicking on Edit Image.
Fixes #49262.

git-svn-id: https://develop.svn.wordpress.org/trunk@47229 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 02:52:12 +00:00
Joe Dolson 1d7cdbeab7 Editor: Fix incorrect usage of ID attributes on custom fields.
Repeated containers used for custom fields have duplicate ID attributes. Duplicate IDs are incorrect HTML, and will also cause unexpected results when trying to manipulate using JS. Duplicate IDs are changed to matching classes; CSS & JS updated to match. 

Props jankimoradiya, audrasjb, donmhico, afercia.
Fixes #46964.


git-svn-id: https://develop.svn.wordpress.org/trunk@47222 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-09 19:39:54 +00:00
Andrea Fercia 43fb40739d Accessibility: Media: Make the toolbar and inline uploader visual order always match the DOM order.
Depending on the specific media view, the media UI elements are placed in a
different visual order. This change makes sure their visual order always
matches the DOM order.

Propos syhc, audrasjb, afercia.
See #37188.
Fixes #48403.


git-svn-id: https://develop.svn.wordpress.org/trunk@47217 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-09 16:30:41 +00:00
Sergey Biryukov e72fff9cef Code Modernization: Replace `dirname( __FILE__ )` calls with `__DIR__` magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.

git-svn-id: https://develop.svn.wordpress.org/trunk@47198 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-06 06:31:22 +00:00
Sergey Biryukov e876090344 TinyMCE: Remove duplicate keys and strings from `langs/wp-langs-en.js`.
Props david.binda.
Fixes #49359.

git-svn-id: https://develop.svn.wordpress.org/trunk@47172 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-04 16:41:46 +00:00
Sergey Biryukov 706daca6a3 Editor: Remove back-compat stub for Classic Editor's old distraction-free writing mode.
The original script was deprecated in [30338] and removed in [32677].

Props Presskopp, ketuchetan.
Fixes #39448.

git-svn-id: https://develop.svn.wordpress.org/trunk@47164 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-02 04:13:25 +00:00
Sergey Biryukov 54c6311c96 Accessibility: Text Changes: Use sentence case for the word `Error` in various error messages, instead of all caps.
Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.

Props afercia, ryokuhi, sabernhardt, garrett-eclipse.
See #47656, #43037, #42945.

git-svn-id: https://develop.svn.wordpress.org/trunk@47156 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-01 21:36:44 +00:00
Sergey Biryukov cfc3b57488 Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47122 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:43:23 +00:00
Sergey Biryukov c9663d78cf Docs: Improve comments in `js/_enqueues/wp/revisions.js` per the documentation standards.
Props passoniate.
Fixes #49177.

git-svn-id: https://develop.svn.wordpress.org/trunk@47120 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-29 00:35:39 +00:00
Sergey Biryukov c1abc8203a Docs: Fix typo in a comment in `js/media/models/attachment.js`.
Props wptoolsdev.
Fixes #49303.

git-svn-id: https://develop.svn.wordpress.org/trunk@47117 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-27 14:42:37 +00:00
Sergey Biryukov 1160c97303 Customize: Fix typo in `CustomHeader.prototype.initialize()` DocBlock in `src/js/_enqueues/wp/custom-header.js`.
Props ankitmaru.
Fixes #49301.

git-svn-id: https://develop.svn.wordpress.org/trunk@47116 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-27 14:32:00 +00:00
Andrew Ozz 9224e14e67 Privacy: Cleanup `.wp-policy-help` CSS remnants and add back-compat when hiding the tutorial content before copying.
Props garrett-eclipse.
Fixes #49282.

git-svn-id: https://develop.svn.wordpress.org/trunk@47112 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-26 23:00:54 +00:00
Sergey Biryukov ad2261bfdd I18N: Synchronize MediaElement.js translation strings with the currently bundled version.
Some strings were previously removed in [43345] and accidentally reintroduced in [44163].

Props ramiy.
Fixes #49249. See #42139, #37453.

git-svn-id: https://develop.svn.wordpress.org/trunk@47094 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-21 02:19:04 +00:00
Sergey Biryukov 0a6720af6b Coding Standards: Add missing braces to `if` conditions in `js/_enqueues/wp/customize/base.js`.
Props ankitmaru.
Fixes #49122.

git-svn-id: https://develop.svn.wordpress.org/trunk@47038 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-04 01:26:26 +00:00
Sergey Biryukov 10d4ad91b0 Site Health: Fix typo in a variable name in `js/_enqueues/admin/site-health.js`.
Props nickylimjj.
Fixes #49112.

git-svn-id: https://develop.svn.wordpress.org/trunk@47031 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:09:27 +00:00
Sergey Biryukov 83defdf556 Coding Standards: Move assignment out of condition in `js/media/controllers/library.js`.
Props ankitmaru.
Fixes #49108.

git-svn-id: https://develop.svn.wordpress.org/trunk@47030 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:05:29 +00:00
Sergey Biryukov aaee49fb63 Coding Standards: Move assignment out of condition in `js/media/views/settings.js`.
Props ankitmaru.
Fixes #49107.

git-svn-id: https://develop.svn.wordpress.org/trunk@47029 602fd350-edb4-49c9-b593-d223f7449a82
2020-01-02 12:00:11 +00:00
Sergey Biryukov 7abc076e13 Shortcodes: Make sure `wp.shortcode.string()` accepts the `attrs` array keys in any order.
Props yale01, georgestephanis, adamsilverstein, zsusag, mircoraffinetti, SergeyBiryukov.
Fixes #36263.

git-svn-id: https://develop.svn.wordpress.org/trunk@47003 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-21 18:32:45 +00:00
Sergey Biryukov 38cfdae6e9 I18N: Make the minimum input length to start searching posts in the "Insert/edit link" modal localizable.
Props Toro_Unit, birgire, miyauchi, swissspidy, ocean90.
Fixes #44662.

git-svn-id: https://develop.svn.wordpress.org/trunk@46988 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-18 01:13:14 +00:00
Sergey Biryukov 49c6bc2a69 Coding Standards: Add missing braces to `if` conditions in `js/_enqueues/wp/util.js`.
Props ankitmaru.
Fixes #48980.

git-svn-id: https://develop.svn.wordpress.org/trunk@46960 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-15 08:43:42 +00:00
Andrew Ozz c85e33c28f Fixes in `admin-bar.js`:
- Silence errors when a node doesn't exist similarly to jQuery.
- Add "feature testing" and fallbacks for old browsers as this may run on the front-end.
- Improve inline docs.

Props dinhtungdu, azaozz.
Fixes #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46883 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-11 18:54:55 +00:00
Andrew Ozz 0566a2a5fb TinyMCE: remove CSS map reference from `/tinymce/skins/lightgray/skin.min.css`.
Props AlexHolsgrove.
Fixes #48577.

git-svn-id: https://develop.svn.wordpress.org/trunk@46879 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 18:31:46 +00:00
Sergey Biryukov 7ac5a9f003 Coding Standards: Fix WPCS and JSHint issues in [46872].
See #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46874 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 01:32:56 +00:00
Andrew Ozz 2133f8392e Fix the admin toolbar js when jQuery is not present and replace the jQuery based hoverIntent.js with a native implementation. Introduces the "hoverintent" (no dependencies) package.
Props dinhtungdu, audrasjb, azaozz.
Fixes #47069.

git-svn-id: https://develop.svn.wordpress.org/trunk@46872 602fd350-edb4-49c9-b593-d223f7449a82
2019-12-10 01:01:35 +00:00
Sergey Biryukov a03bb54546 Docs: Replace `@returns` tags in JS docs with `@return`.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead:
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46800 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 17:59:47 +00:00
Sergey Biryukov ea5bfe134f Docs: Add missing full stops to `@returns` tags in JS docs, per the documentation standards.
Props shital-patel, kalpshit.
Fixes #48305.

git-svn-id: https://develop.svn.wordpress.org/trunk@46799 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-29 16:55:01 +00:00
Andrea Fercia 82e352e412 Accessibility: Media: Add an `aria-pressed` attribute to active button within a button group.
The `aria-pressed` attribute communicates semantically the "active" state of buttons that otherwise only look "active".

Fixes #48355.


git-svn-id: https://develop.svn.wordpress.org/trunk@46748 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-18 22:21:26 +00:00
Andrea Fercia 72e66c100e Widgets: Avoid to move focus to the Image Widget "Insert from URL" field.
Fixes a bug after [45499], where the backbone view element isn't the input field any longer. Also, managing focus programmatically is often an assumption on a specific user flow and should generally be avoided, see #43169.

Props dufresnesteven.
See #43169.
Fixes #48588.


git-svn-id: https://develop.svn.wordpress.org/trunk@46745 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-18 16:21:37 +00:00
Sergey Biryukov 8781a41915 Docs: Update broken source code link in `imgAreaSelect` jQuery plugin.
Props mryoga, finchps.
See #48467.

git-svn-id: https://develop.svn.wordpress.org/trunk@46741 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-17 16:12:43 +00:00
Sergey Biryukov 7bb2a562a6 Docs: Correct spelling of "subclass" and "overridden" in various docblocks and error messages.
Props garrett-eclipse.
Fixes #48676.

git-svn-id: https://develop.svn.wordpress.org/trunk@46739 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-17 07:41:49 +00:00
Sergey Biryukov ae487b5f67 Comments: Check if comment form element exists before adding a key handler to detect the cmd/ctrl-enter key press.
Follow-up to [45790].

Props raamdev.
Fixes #48543. See #41545.

git-svn-id: https://develop.svn.wordpress.org/trunk@46700 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-11 11:49:29 +00:00
Jonathan Desrosiers 9d88dbac58 External Libraries: Revert [46634-46635].
On further investigation, Plupload changed it’s license to a non-GPL compatible license. The newest, GPL compatible version is being used already in Core.

Unprops desrosj.
See #48277.

git-svn-id: https://develop.svn.wordpress.org/trunk@46638 602fd350-edb4-49c9-b593-d223f7449a82
2019-11-03 17:07:42 +00:00