Commit Graph

40401 Commits

Author SHA1 Message Date
Sergey Biryukov
f29fdab426 Coding Standards: Fix WPCS issue in [46262].
See #47952.

git-svn-id: https://develop.svn.wordpress.org/trunk@46266 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 19:28:43 +00:00
Sergey Biryukov
06868d4d12 Privacy: Introduce wp_privacy_personal_data_email_to and wp_privacy_personal_data_email_subject filters.
Pass email data to the `wp_privacy_personal_data_email_content` filter.

Props garrett-eclipse, thakkarhardik, birgire.
Fixes #46303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46265 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 19:24:20 +00:00
Sergey Biryukov
7ae0a5985f Privacy: Show a success message for personal data erasure.
Props garrett-eclipse, allendav, birgire, JoshuaWold, karmatosed, pputzer.
Fixes #44135.

git-svn-id: https://develop.svn.wordpress.org/trunk@46264 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 19:12:04 +00:00
John Blackbourn
027710ef8e Taxonomy: Redirect to the correct URL after deleting a taxonomy term attached to a post type other than Post.
Props donmhico, mukesh27

Fixes #47858


git-svn-id: https://develop.svn.wordpress.org/trunk@46263 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 19:09:54 +00:00
John Blackbourn
f3a268f58c Build/Test tools: Ensure the create_and_get() factory method returns the appropriate WP_Error when creating a term fails.
Fixes: #47952 


git-svn-id: https://develop.svn.wordpress.org/trunk@46262 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:54:16 +00:00
Jonathan Desrosiers
2b076b7709 Coding Standards: Fix a coding standards issue introduced in [46254].
See #37392.

git-svn-id: https://develop.svn.wordpress.org/trunk@46261 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:33:10 +00:00
Jonathan Desrosiers
63bf8c8316 External Libraries: Fix PHP 7.4 compatibility issues in the SimplePie library.
See: 38b504969e

Props jrf, stevenkword, jorbin, desrosj.
See #47746.

git-svn-id: https://develop.svn.wordpress.org/trunk@46260 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:16:14 +00:00
Andrea Fercia
5863bd30a0 Fix PHP coding standards after [46251].
git-svn-id: https://develop.svn.wordpress.org/trunk@46259 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:11:15 +00:00
Jonathan Desrosiers
58bd8a48e6 External Libraries: Fix PHP 7.4 compatibility issues in the Requests library.
See: https://github.com/rmccue/Requests/compare/v1.7.0...3470169

Props jrf, jorbin, desrosj.
See #47746.

git-svn-id: https://develop.svn.wordpress.org/trunk@46258 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:11:01 +00:00
Ella van Durpe
c1d89f782a r46253: Use implode instead of join, see #47746
git-svn-id: https://develop.svn.wordpress.org/trunk@46257 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:08:41 +00:00
Andrea Fercia
0ff03b3290 Login and Registration: Add a "Show password" button on the login page.
The ability for users to see the password they're typing improves usability and accessibility of the login users flow.

- brings the login screen in line with the same feature already used in the New User, Edit User, and Reset Password pages
- improves association of labels and input fields by using explicit association with `for` / `id` attributes
- slightly increases the "Remember me" label font size

Props johnbillion, Iceable, audrasjb, joyously, adamsilverstein, boemedia, DrewAPicture, shadyvb, birgire, peterwilsoncc, pento, anevins, davidbaumwald, whyisjake, afercia.
Fixes #42888.


git-svn-id: https://develop.svn.wordpress.org/trunk@46256 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 18:05:16 +00:00
Ella van Durpe
03fe23cc8a Revert accidental change to package-lock.json in r46253
git-svn-id: https://develop.svn.wordpress.org/trunk@46255 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:59:10 +00:00
John James Jacoby
1c69792253 Multisite/Sites: supplemental commit to r46251.
This commit adds the links to the list-table class itself (that were missed in r46251.)

See #37392. Props pbiron, thomaswm.



git-svn-id: https://develop.svn.wordpress.org/trunk@46254 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:50:22 +00:00
Ella van Durpe
83dd94f3a8 Editor: Add Nonce Endpoint
This is a follow up to #47843, implementing a PHP endpoint and inline scripts 
after the editor package updates. The action was originally added in
https://github.com/WordPress/gutenberg/pull/16683.

Fixes #48076.




git-svn-id: https://develop.svn.wordpress.org/trunk@46253 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:46:33 +00:00
K. Adam White
42e5e4d5d5 REST API: Introduce date_floating property on status endpoint response objects.
Expose a date_floating property on all status objects to permit clients (including the block editor) to make correct decisions about date handling for posts of varying status.

Props mnelson4, earnjam, kadamwhite, jnylen0, nerrad, pento.
See #39953.



git-svn-id: https://develop.svn.wordpress.org/trunk@46252 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:39:36 +00:00
John James Jacoby
f2b03e208a Multisite/Sites: Add links to filter websites by status.
This commit brings the Network-Admin Sites list page up-to-speed with other similar list-table powered pages, by adding links to filter the results by Site Status.

Includes a single unit test for the newly introduced `wp_count_sites()` multisite function, named to match the `wp_count_` function pattern from other list tables.

Fixes #37392. Props mnelson4, spacedmonkey, pbiron.



git-svn-id: https://develop.svn.wordpress.org/trunk@46251 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:34:20 +00:00
Andrea Fercia
aba005be39 Accessibility: Make sortable meta boxes non sortable when there are no locations they can be dragged to.
Depending on the amount of meta boxes and the layout settings under Screen Options, sortable meta boxes may not be actually sortable.
In these cases, jQuery UI sortable needs to be disabled and the user interface shouldn't use a CSS `cursor: move`.

The use of consistent and relevant cursors may be important for users who have a cognitive disability, since cursors give a visual clue as to an element's functionality. Using the move cursor for elements which cannot be moved may be confusing or counter-intuitive for users.

Props adamsilverstein, antpb, anevins.
Fixes #47131.


git-svn-id: https://develop.svn.wordpress.org/trunk@46250 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:29:46 +00:00
K. Adam White
27a5302e7d REST API: Pass "null" as the post date property to reset post to initial "floating" date value.
Props TimothyBlynJacobs, adamsilverstein, jnylen0, mnelson4.
Fixes #44975.



git-svn-id: https://develop.svn.wordpress.org/trunk@46249 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 17:24:58 +00:00
Andrea Fercia
e3db9a1361 Accessibility: Improve and modernize user interface controls. Sixth part: allow checkboxes and radio buttons to scale with text.
- uses a SVG icon for checkboxes
- uses CSS `rem` relative units

Props kjellr, afercia, audrasjb.
Fixes #47498.


git-svn-id: https://develop.svn.wordpress.org/trunk@46248 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 16:50:17 +00:00
Andrea Fercia
e994411a99 Accessibility: Improve and modernize user interface controls for better contrast. Fifth part: Common form controls.
Props anevins, melchoyce, audrasjb, kjellr.
Fixes #47153.


git-svn-id: https://develop.svn.wordpress.org/trunk@46247 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 16:20:24 +00:00
Jonathan Desrosiers
0ff7ebdd97 Docs: Improve documentation for the supports argument in register_post_type()/add_post_type_support().
Follow up of [46160].

Fixes #40413.

git-svn-id: https://develop.svn.wordpress.org/trunk@46246 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 16:07:23 +00:00
Anthony Burchell
3363eaa22d Media: Sets post_id optional in media_sideload_image() and media_handle_sideload().
Props SergeyBiryukov, donmhico, mikeschroder, sebastian.pisula.
Fixes #43579.


git-svn-id: https://develop.svn.wordpress.org/trunk@46245 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 16:02:38 +00:00
Andrea Fercia
036973ba27 Accessibility: Improve and modernize user interface controls for better contrast. Fourth part: Media Views form controls.
Props anevins, audrasjb, nrqsnchzm, kjellr, karmatosed.
Fixes #47150.


git-svn-id: https://develop.svn.wordpress.org/trunk@46244 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 15:48:32 +00:00
Andrea Fercia
3f58ce59d7 Accessibility: Improve and modernize user interface controls. Third part: allow buttons and form controls to scale with text.
Props kjellr, abrightclearweb, audrasjb.
Fixes #47477.


git-svn-id: https://develop.svn.wordpress.org/trunk@46243 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 15:26:23 +00:00
Andrea Fercia
82bded36f8 Accessibility: Improve and modernize user interface controls for better contrast. Second part: tables, meta boxes, and other user interface elements.
Introduces better contrast for borders of the following user interface elements:
- Tables
- Screen Options and Help 
- Admin notices
- Welcome panel
- Meta boxes (post boxes)
- Cards
- Health Check accordions and headings
- Theme and Plugin upload forms

Props kjellr, melchoyce, karmatosed, audrasjb.
Fixes #48101.


git-svn-id: https://develop.svn.wordpress.org/trunk@46242 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 15:09:59 +00:00
Andrea Fercia
94211aeb05 Accessibility: Improve and modernize user interface controls for better contrast. First part: buttons and links.
- Introduces new styles for the buttons, with better contrast for borders and better focus style.
- Introduces a new focus style for links.
- The new styles improve consistency with the ones used in the new Block Editor (Gutenberg).

Props michaelarestad, truchot, mor10, kellychoffman, adamsoucie, paaljoachim, Joen, kjellr, melchoyce, karmatosed, audrasjb, afercia.
Fixes #34904.


git-svn-id: https://develop.svn.wordpress.org/trunk@46241 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 14:42:36 +00:00
Andrea Fercia
42b5133a25 Accessibility: Menus: Improve the menu items "Select All".
- changes "Select All" from a link to a checkbox
- the new checkbox is available only when JavaScript support is on
- semantically and for accessibility, a checkbox is a better user interface control because the available action is clear to all users and the selected state is communicated natively
- it's consistent with the existing pattern for the admin tables

Props birgire, audrasjb, afercia.
Fixes #47048.


git-svn-id: https://develop.svn.wordpress.org/trunk@46240 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 12:41:14 +00:00
Andrea Fercia
01b18e824f Accessibility: Media: Make screen readers announce the Media search results.
- adds audible messages via `wp.a11y.speak()` to announce the search results 
- removes a `keyup` event that was there only to support old browsers 
- removes `aria-modal="true"` from the media modal dialog as it prevents the ARIA live regions to be perceived by screen readers
- triggers the search only after 2 ASCII characters have been typed

Props anevins, antpb, aduth, loreleiaurora, afercia.
Fixes #47146.


git-svn-id: https://develop.svn.wordpress.org/trunk@46239 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 12:18:53 +00:00
Mike Schroder
8fdabdb621 Media: Prevent unnecessary whitespace around PDF Thumbnails.
Stops unintended whitespace from showing around PDF thumbnails
when the PDF creation tool utilized a CropBox.

Props michelweimerskirch, joemcgill.
Fixes #45598.

git-svn-id: https://develop.svn.wordpress.org/trunk@46238 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 10:35:45 +00:00
Andrea Fercia
c9a2fde66e Media: Fix buttons group layout for Internet Explorer 11 after [45499].
Props sabernhardt, afercia.
See #47122.
Fixes #48087.


git-svn-id: https://develop.svn.wordpress.org/trunk@46237 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-23 09:59:15 +00:00
Andrea Fercia
21030b6b21 Accessibility: Make sure the navigation ARIA landmarks used for posts and comments navigation are properly labelled.
The `<nav>` element defines an ARIA landmark by default: landmarks help assistive technology users to perceive the page main sections and jump through them. However, when a landmark is used more than once in a page, it needs to be distinguished from the other ones to let users understand what the landmark is about.

Adds an `aria-label` parameter to the following functions: 

- `_navigation_markup()`
- `get_the_post_navigatio()`
- `get_the_posts_navigation()`
- `get_the_posts_pagination()`
- `get_the_comments_navigation()`
- `get_the_comments_pagination()`

Props sabernhardt, williampatton, SergeyBiryukov, audrasjb.
Fixes #47123.


git-svn-id: https://develop.svn.wordpress.org/trunk@46236 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-22 22:31:34 +00:00
Peter Wilson
123c17536f KSES: Add support for modern layout techniques in style attribute.
Adds support for `flex`, `grid` and `column` layout techniques to the list of CSS attributes considered safe for inline CSS. The `\` character and CSS functions, eg `minmax()` are not yet supported.

Extends support of `border` properties to include `border-radius` and individual `background` properties to include all those implicitly supported by the shorthand attribute.

Props mrahmadawais, marybaum, birgire, peterwilsoncc, azaozz.
Fixes #37248.
See #47367.


git-svn-id: https://develop.svn.wordpress.org/trunk@46235 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-22 22:16:19 +00:00
Andrea Fercia
975812c783 Accessibility: Twenty Nineteen: Improve the special pages headings.
Improves information provided by the headings, their alignment and spacing in the following special pages:
- search page with and without search results
- 404 page (no content)
- archive pages

Props ianbelanger, kjellr, nrqsnchz, audrasjb.
Fixes #47140.


git-svn-id: https://develop.svn.wordpress.org/trunk@46234 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-22 21:58:06 +00:00
K. Adam White
308e86cd78 REST API: Consistently default URL scheme to "rest", not "json".
The "json" scheme is a holdover from the pre-merge plugin version of the REST API, and was corrected elsewhere in core in [34300]. Only "rest" is officially supported in `set_url_scheme()`.

Props DrewAPicture, rmccue.
Fixes #45169.


git-svn-id: https://develop.svn.wordpress.org/trunk@46233 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-22 19:14:03 +00:00
John Blackbourn
6bd7097626 Docs: Docblock corrections and improvements, mostly related to various pre_* filters.
See #47110


git-svn-id: https://develop.svn.wordpress.org/trunk@46232 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 17:40:58 +00:00
Dominik Schilling
144c5f760d Site Health: Don't verify SSL certificate when testing the local site.
The SSL certificate may be self-signed which prevents various tests from returning proper results. Since the Cron API and file editors don't verify the certificate the tests shouldn't either.

Props Clorith, ocean90.
Fixes #47957.

git-svn-id: https://develop.svn.wordpress.org/trunk@46231 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 16:05:13 +00:00
Dominik Schilling
e6ea695f5a File Editor: Don't verify SSL certificate when doing loopback requests for checking for fatal errors.
Props Clorith.
See #47957.

git-svn-id: https://develop.svn.wordpress.org/trunk@46230 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 15:58:38 +00:00
ocean90
cb076cab0d I18N: Remove HTML tags from translatable string in wp-login.php.
See #46349.

git-svn-id: https://develop.svn.wordpress.org/trunk@46229 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 15:53:02 +00:00
Dominik Schilling
39fff01a1f Site Health: Replace wp_get_upload_dir() with wp_upload_dir().
`wp_get_upload_dir()` returns the theoretical path of the uploads directory. When there was no upload yet the test returns an incorrect result (not writeable) because the directory doesn't exist. Switching to `wp_upload_dir()`, which creates the directory on the fly, ensures a proper test result.

Fixes #47958.

git-svn-id: https://develop.svn.wordpress.org/trunk@46228 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 15:48:56 +00:00
Sergey Biryukov
2d1e8ada5e Coding Standards: Add missing break for the default case in get_default_comment_status(().
Props itowhid06.
Fixes #48095.

git-svn-id: https://develop.svn.wordpress.org/trunk@46227 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 13:49:04 +00:00
Sergey Biryukov
d6749c7669 Docs: Correct type for the $data parameter of WP_Theme::cache_add().
Props itowhid06.
Fixes #48096.

git-svn-id: https://develop.svn.wordpress.org/trunk@46226 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 13:47:12 +00:00
Sergey Biryukov
4eb545aba0 Code Modernization: Use the ** operator instead of the pow() function in wp_convert_bytes_to_hr() for better performance.
Use the `MB_IN_BYTES` constant instead of the `pow()` function in `WP_Customize_Manager::_validate_header_video()` for better readability.

Props ayeshrajans, jrf.
Fixes #48083.

git-svn-id: https://develop.svn.wordpress.org/trunk@46225 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 12:48:29 +00:00
Sergey Biryukov
4d6ca5bfe5 Tests: Correct assertion in test_wp_validate_boolean() to make sure the return type is properly tested.
Props jrf.
Fixes #39868.

git-svn-id: https://develop.svn.wordpress.org/trunk@46224 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 10:28:53 +00:00
John Blackbourn
1199a99f73 Docs: Improve the docs for comment counting related functions.
See #47110, #48093


git-svn-id: https://develop.svn.wordpress.org/trunk@46223 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-21 10:01:05 +00:00
Sergey Biryukov
0bd3d78db1 Tests: Remove a workaround for str_getcsv().
The `str_getcsv()` function was introduced in PHP 5.3.0, so no longer needs a polyfill.

Props jrf.
Fixes #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46222 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:43:50 +00:00
Sergey Biryukov
5f0fb23a3b Tests: Remove a workaround for get_called_class().
The `get_called_class()` function was introduced in PHP 5.3, so no longer needs a workaround.

Mark `WP_UnitTestCase_Base::get_called_class()` as deprecated. Leave it in place for now as plugins or themes using the WP unit test framework might still call this method.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46221 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:39:23 +00:00
Sergey Biryukov
4ee97a4ac3 Code Modernization: Remove workarounds for spl_object_hash().
The `spl_object_hash()` function was introduced in PHP 5.2.0. As of PHP 5.3, the PHP SPL extension can no longer be disabled, so these workarounds are no longer needed.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46220 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:33:13 +00:00
Sergey Biryukov
3a49864e41 Tests: Remove a test for rest_preload_api_request() only relevant for PHP 5.2.
Props dkarfa.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46219 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:26:18 +00:00
Sergey Biryukov
8e454ba7f8 Code Modernization: Remove a workaround for CURLOPT_PROTOCOLS in WP_Http_Curl::request().
The `CURLOPT_PROTOCOLS` constant was introduced in PHP 5.2.10, so no longer needs a workaround.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46218 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:22:38 +00:00
Sergey Biryukov
f3a0da9fca Code Modernization: Remove a workaround for IMAGETYPE_ICO in file_is_displayable_image().
The `IMAGETYPE_ICO` constant was introduced in PHP 5.3, so no longer needs a workaround.

Props jrf.
See #48074.

git-svn-id: https://develop.svn.wordpress.org/trunk@46217 602fd350-edb4-49c9-b593-d223f7449a82
2019-09-20 22:17:48 +00:00