Commit Graph

41133 Commits

Author SHA1 Message Date
Sergey Biryukov
d4cc38581b Tests: Rename $d variable in some date/time tests to $format for clarity.
Follow-up to [47287].

See #49222.

git-svn-id: https://develop.svn.wordpress.org/trunk@47288 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-14 00:11:00 +00:00
Sergey Biryukov
543944257c Coding Standards: Rename $d parameter in various date/time functions to $format for clarity.
See #49222.

git-svn-id: https://develop.svn.wordpress.org/trunk@47287 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-14 00:05:43 +00:00
Sergey Biryukov
a41b2d93d3 Docs: Update @return tag for wp_allow_comment() with trash as a possible return value.
Props oakesjosh, jeremyfelt.
Fixes #49206.

git-svn-id: https://develop.svn.wordpress.org/trunk@47286 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-13 17:48:50 +00:00
Sergey Biryukov
3dd39ffece General: Update Michel Valdrighi's website in license.txt.
Props sebastienserre.
Fixes #49130.

git-svn-id: https://develop.svn.wordpress.org/trunk@47285 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-12 11:52:11 +00:00
Sergey Biryukov
58efcbdcd6 Privacy: Only show the Privacy Policy page notice when editing the page, not on drafts list.
Props chetan200891, xkon, garrett-eclipse.
Fixes #48431.

git-svn-id: https://develop.svn.wordpress.org/trunk@47284 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-12 11:42:23 +00:00
Sergey Biryukov
a6d078c228 Privacy: Improve the appearance of privacy request email inputs on mobile.
Props garrett-eclipse, xkon.
Fixes #48189.

git-svn-id: https://develop.svn.wordpress.org/trunk@47283 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-12 11:27:27 +00:00
Jorge Costa
20849f39b4 Post WordPress 5.4 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@47282 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 22:44:50 +00:00
Jorge Costa
f9fe81df19 WordPress 5.4 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/trunk@47281 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 22:18:40 +00:00
Sergey Biryukov
f97a60c9b7 Privacy: Revert [47269] for now to address side effects on Multisite installations.
See #44176.

git-svn-id: https://develop.svn.wordpress.org/trunk@47280 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 21:46:54 +00:00
Sergey Biryukov
1106d82f93 Privacy: Introduce filters for the headers of all the privacy-related e-mails:
* `wp_privacy_personal_data_email_headers`
* `user_request_confirmed_email_headers`
* `user_erasure_complete_email_headers`
* `user_request_action_email_headers`

Props xkon, garrett-eclipse, zaffarn, desrosj.
Fixes #44501.

git-svn-id: https://develop.svn.wordpress.org/trunk@47279 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 21:41:26 +00:00
Sergey Biryukov
b8e935b2f2 Privacy: Add a table of contents to Personal Data Export report for easier navigation.
Props xkon, garrett-eclipse, birgire, karmatosed.
Fixes #46894.

git-svn-id: https://develop.svn.wordpress.org/trunk@47278 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 21:26:25 +00:00
Sergey Biryukov
d6352c544b Coding Standards: Use a strict in_array() check for reserved names of user data items in wp_user_personal_data_exporter().
Props azaozz.
Fixes #47509.

git-svn-id: https://develop.svn.wordpress.org/trunk@47277 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 20:53:40 +00:00
Sergey Biryukov
4020493d45 Comments: Add a $post_id parameter to get_comments_number_text() and comments_number().
This allow for using these functions outside of the loop.

Props donmhico, garrett-eclipse, Hinjiriyo, imath.
Fixes #48772.

git-svn-id: https://develop.svn.wordpress.org/trunk@47276 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 20:39:12 +00:00
Jonathan Desrosiers
c83253c7f8 Upgrade/Install: Enable maintenance mode when plugins are auto-updated.
When an attempt is made to update an active plugin automatically, there is the potential currently for two negative scenarios:

- The plugin can be deactivated if the Plugins admin screen is loaded when the plugin update is incomplete, causing a PHP error.
- The WSOD protection could be triggered, sending a false alarm email to the site administrator.

By enabling maintenance mode before an active plugin update is attempted, these scenarios can be avoided.

This change implements the same approach as the `Theme_Upgrader` class of using the `upgrader_pre_install` and `upgrader_post_install` hooks to toggle maintenance mode.

Props desrosj, SergeyBiryukov.
Fixes #49400.

git-svn-id: https://develop.svn.wordpress.org/trunk@47275 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 20:12:52 +00:00
Andrew Ozz
896de1cba2 Media: Pass through the $unfiltered param to get_attached_file() in wp_get_original_image_path().
Props ianmjones, joemcgill, azaozz.
Fixes #48421.

git-svn-id: https://develop.svn.wordpress.org/trunk@47274 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 19:45:46 +00:00
Ian Belanger
e7382153fe Bundled Themes: Twenty Sixteen text color setting in pullquote block not applied.
Fixes the pullquote color setting by moving `color` from `blockquote p` to `blockquote`. Also adds the border-left to the front-end stylesheet to match the editor. Also adds styles for rtl pullquote.

Props kokkieh, desrosj, mukesh27, khushbu19, disillusia, aliveic, abrightclearweb, SergeyBiryukov.
Fixes #47019.

git-svn-id: https://develop.svn.wordpress.org/trunk@47273 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 19:36:56 +00:00
Sergey Biryukov
c7267a039f Export: Use correct context for the Posts label on the Export screen.
The string refers to the post type name specifically, not to a generic term to identify a publication on WordPress.

Props audrasjb, jdy68.
Fixes #49306.

git-svn-id: https://develop.svn.wordpress.org/trunk@47272 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 19:33:58 +00:00
Jorge Costa
e608cd21ac Upload: Fix Plugin and Theme upload form are misaligned.
This commit makes sure that when uploading a plugin or theme file, the Install Now button is correctly aligned, and the button does not drops to the next line if filename is long.

Props seedsca, SergeyBiryukov, audrasjb.
Fixes #48859.

git-svn-id: https://develop.svn.wordpress.org/trunk@47271 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 19:16:57 +00:00
Sergey Biryukov
0ad4121c91 Privacy: Introduce wp_privacy_additional_user_data filter to make it easier to include additional user meta in a personal data export.
Props pbiron, xkon, garrett-eclipse, azaozz.
Fixes #47509.

git-svn-id: https://develop.svn.wordpress.org/trunk@47270 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 18:57:51 +00:00
Sergey Biryukov
0911aecf36 Privacy: Un-map privacy capabilities to make them available to be assigned for custom roles:
* `erase_others_personal_data`
* `export_others_personal_data`
* `manage_privacy_options`

Previously mapped to `manage_options` or `manage_network` (on Multisite), these are now added to the Administrator role separately.

Additionally, `manage_privacy_options` is added to the Editor role.

Props garrett-eclipse, xkon, pbiron, desrosj, johnbillion, flixos90, juliobox, lakenh, Ov3rfly, ianatkins.
Fixes #44176.

git-svn-id: https://develop.svn.wordpress.org/trunk@47269 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 18:34:08 +00:00
Sergey Biryukov
49b145c23f Site Health: Adjust "Database username" and "Table prefix" strings for consistency with the same strings in wp-admin/setup-config.php.
Props ramiy.
Fixes #47043.

git-svn-id: https://develop.svn.wordpress.org/trunk@47268 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:46:10 +00:00
Sergey Biryukov
2599e1b4fb Customize: Avoid unnecessary get_theme_mod() call and premature escaping in get_header_video_url().
The result is still escaped with `esc_url_raw()` for retrieval, and with `esc_url()` for display in `the_header_video_url()`.

Props dlh, Tkama.
Fixes #40044.

git-svn-id: https://develop.svn.wordpress.org/trunk@47267 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:34:09 +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
K. Adam White
b6dcb779ed REST API: Introduce rest_{$this->post_type}_item_schema filter to enable manipulation of schema values.
register_rest_field can be used to add properties to a schema, but no mechanism existed to alter existing properties like "content".
Running the schema through this filter lets plugins append additional sub-properties to existing schema definitions.

Props luisherranz, TimothyBlynJacobs, swissspidy, westonruter, kadamwhite.
Fixes #47779.



git-svn-id: https://develop.svn.wordpress.org/trunk@47265 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:26:56 +00:00
Ian Belanger
72e7742446 Bundled Themes: Twenty Twenty property border-style is overwritten - coding standard.
Fixes coding standard violations in the classic editor stylesheets.

Props ankitmaru.
Fixes #49006.

git-svn-id: https://develop.svn.wordpress.org/trunk@47264 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 16:09:50 +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
K. Adam White
886a02686b REST API: Allow meta to be set when creating a new media record via REST.
Props TimothyBlynJacobs, apermo.
Fixes #44567.


git-svn-id: https://develop.svn.wordpress.org/trunk@47261 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 03:37:17 +00:00
K. Adam White
fc434a0c77 REST API: Match REST API routes on namespace before performing regex checks.
Rule out groups of API endpoints by simple namespace string comparison to reduce the number of regex checks necessary when matching a route.

Props TimothyBlynJacobs.
Fixes #48530.


git-svn-id: https://develop.svn.wordpress.org/trunk@47260 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 03:20:05 +00:00
azaozz
3125c21cc4 Media: Improve wording for error message on failed post-processing of uploaded images.
Props eclev91, desrosj, antpb, azaozz.
Fixes #49280.

git-svn-id: https://develop.svn.wordpress.org/trunk@47259 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 03:18:02 +00:00
K. Adam White
d06637f9b5 REST API: List all core theme feature support details in /themes endpoint response.
Fully list which first-party core theme features are supported in the /themes endpoint response. This brings the REST API themes controller's response more in line with the output of get_theme_support().

Props adamboro, apieschel, koke, spacedmonkey, TimothyBlynJacobs.
See #49037.


git-svn-id: https://develop.svn.wordpress.org/trunk@47258 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 01:58:08 +00:00
Sergey Biryukov
b364e2a072 Media: Improve the preview of transparent images in Image widget by using CSS3 to show a checkered background.
Props bahia0019.
Fixes #49237.

git-svn-id: https://develop.svn.wordpress.org/trunk@47257 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 01:45:01 +00:00
Sergey Biryukov
d9c6c5eed9 Administration: Move .has-row-actions class in Recent Comments dashboard widget next to .dashboard-comment-wrap, for consistency.
Follow-up to [47255].

See #42938.

git-svn-id: https://develop.svn.wordpress.org/trunk@47256 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 01:19:55 +00:00
Sergey Biryukov
196fc7ab60 Administration: Remove a blank space in the Recent Comments dashboard widget if avatars are disabled on Discussion Settings screen.
Props Marius84, shital-patel, GaryJ, ianbelanger, sgastard, lgrev01, donmhico, garrett-eclipse, audrasjb, SergeyBiryukov.
Fixes #42938.

git-svn-id: https://develop.svn.wordpress.org/trunk@47255 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 01:15:31 +00:00
Sergey Biryukov
8650885f85 Site Health: Improve the wording for PHP update recommendations.
Props Clorith, grafruessel, sathyapulse, wpgurudev, garrett-eclipse, marybaum, xkon, SergeyBiryukov.
Fixes #48716.

git-svn-id: https://develop.svn.wordpress.org/trunk@47254 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 00:39:11 +00:00
Sergey Biryukov
49d8c4eff3 Docs: Improve documentation for tests/phpunit/includes/spy-rest-server.php.
Props andizer.
Fixes #47567.

git-svn-id: https://develop.svn.wordpress.org/trunk@47253 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 00:18:28 +00:00
Sergey Biryukov
22ca3c51a6 Comments: Improve the appearance of the Status box on Edit Comment screen.
This makes the box more consistent with the Publish meta box in classic editor.

Props birgire, nfmohit, melchoyce, afercia.
Fixes #43587.

git-svn-id: https://develop.svn.wordpress.org/trunk@47252 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-11 00:05:01 +00:00
Sergey Biryukov
45cb25d4f2 Media: In media_sideload_image(), store the original attachment URL in the _source_url post meta value.
Props dshanske, joemcgill, antpb.
Fixes #48164.

git-svn-id: https://develop.svn.wordpress.org/trunk@47251 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 23:45:50 +00:00
Jorge Costa
f558f5ff37 Block Editor: Update WordPress Packages; Remove navigation block; Add social links block
The following package versions were changed:
@wordpress/annotations: 1.11.0 -> 1.12.0
@wordpress/api-fetch: 3.10.0 -> 3.11.0
@wordpress/block-directory: 1.4.0 -> 1.5.0
@wordpress/block-editor: 3.6.0 -> 3.7.0
@wordpress/block-library: 2.13.0 -> 2.14.0
@wordpress/blocks: 6.11.0 -> 6.12.0
@wordpress/components: 9.1.0 -> 9.2.0
@wordpress/core-data: 2.11.0 -> 2.12.0
@wordpress/data: 4.13.0 -> 4.14.0
@wordpress/data-controls: 1.7.0 -> 1.8.0
@wordpress/e2e-test-utils: 4.2.0 -> 4.3.0
@wordpress/edit-post: 3.12.0 -> 3.13.0
@wordpress/editor: 9.11.0 -> 9.12.0
@wordpress/format-library: 1.13.0 -> 1.14.0
@wordpress/icons: 1.0.0 -> 1.1.0
@wordpress/keyboard-shortcuts: 1.0.0 -> 1.1.0
@wordpress/list-reusable-blocks: 1.12.0 -> 1.13.0
@wordpress/media-utils: 1.6.0 -> 1.7.0
@wordpress/notices: 1.12.0 -> 2.0.0
@wordpress/nux: 3.11.0 -> 3.12.0
@wordpress/plugins: 2.11.0 -> 2.12.0
@wordpress/primitives: 1.0.0 -> 1.1.0
@wordpress/rich-text: 3.11.0 -> 3.12.0
@wordpress/server-side-render: 1.7.0 -> 1.8.0
@wordpress/url: 2.10.0 -> 2.11.0
@wordpress/viewport: 2.12.0 -> 2.13.0
The navigation block inclusion was reverted.
The social links block was included.

Props gziolo, youknowriad, mcsf, noisysocks.
Fixes #49397.

git-svn-id: https://develop.svn.wordpress.org/trunk@47250 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 22:31:13 +00:00
Sergey Biryukov
de5d82fe52 Docs: Improve documentation for the $attr parameter of wp_get_attachment_image().
Props juanfra, Mte90, DrewAPicture, joemcgill, SergeyBiryukov.
Fixes #36661.

git-svn-id: https://develop.svn.wordpress.org/trunk@47249 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 22:01:49 +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
7a7c3c60d9 Privacy: Convert buttons to links visually in Privacy Export/Erasure "Next Steps" column.
With a lot of export or erasure requests, the secondary buttons were becoming overwhelming when stacked on top of each other.

Props xkon, karmatosed.
Fixes #49323.

git-svn-id: https://develop.svn.wordpress.org/trunk@47247 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 21:13:08 +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
c0c2fd3f63 Privacy: Rename wp_get_user_request_data() to wp_get_user_request() for clarity; deprecate the old function.
The function returns an instance of the `WP_User_Request` object itself, not its `$request_data` property.

Follow-up to [44606].

Props garrett-eclipse.
Fixes #46302.

git-svn-id: https://develop.svn.wordpress.org/trunk@47245 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 19:55:51 +00:00
Ian Belanger
d4475d552c Bundled Themes: Twenty Twenty post navigation links outside of the container.
Fixes a bug where the in-page pagination does not align within the inner container.

Props ataurr, audrasjb, mukesh27.
Fixes #48979.

git-svn-id: https://develop.svn.wordpress.org/trunk@47244 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 19:23:38 +00:00
Ian Belanger
a604bba1f7 Bundled Themes: Twenty Twenty add WhatsApp to the social icon menu.
This adds WhatsApp as an option in the social icon menu.

Props rryyaanndd, audrasjb.
Fixes #49098.

git-svn-id: https://develop.svn.wordpress.org/trunk@47243 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 19:10:21 +00:00
Sergey Biryukov
f160d6a765 Twenty Nineteen: Add the missing inc/helper-functions.php file.
Follow-up to [47214].

Props kjellr, jffng.
Fixes #45984.

git-svn-id: https://develop.svn.wordpress.org/trunk@47242 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 19:05:17 +00:00
Ian Belanger
d56903d331 Bundled Themes: Twenty Twenty Author Bio/Post Meta Width in Cover Template in Mobile.
Fixes a bug where the author bio and post meta have no left or right padding in smaller viewports.

Props JarretC.
Fixes #49254.

git-svn-id: https://develop.svn.wordpress.org/trunk@47241 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 18:23:29 +00:00
Jorge Costa
437ac63d76 Block Editor: Backport inclusion of new editor settings to the core.
This commit includes in the core settings for the gradients theme API stabilized in https://github.com/WordPress/gutenberg/pull/20107, and for the image sizes required for the latest posts feature image https://github.com/WordPress/gutenberg/pull/17151/.

Props: youknowriad, ryelle.
Fixes #49389.

git-svn-id: https://develop.svn.wordpress.org/trunk@47240 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 17:50:36 +00:00
Timothy Jacobs
e7399111b4 REST API: Add support for the REDIRECT_HTTP_AUTHORIZATION header.
Previously the REST API did not account for server configurations where the Authorization header must be added using ModRewrite. This caused major DUX issues when trying to use custom authentication mechanisms.

Fixes #47077.
Props dshanske, cklosows.


git-svn-id: https://develop.svn.wordpress.org/trunk@47239 602fd350-edb4-49c9-b593-d223f7449a82
2020-02-10 16:06:58 +00:00