Commit Graph

6864 Commits

Author SHA1 Message Date
Dominik Schilling
2d4311e32e Privacy: Remove is-dismissible class from notice when privacy info has changed.
The notice isn't dismissible as it only gets removed once you visit the privacy guide, see #44057 and #44063.

Fixes #44065.

Built from https://develop.svn.wordpress.org/trunk@43261


git-svn-id: http://core.svn.wordpress.org/trunk@43090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 15:55:21 +00:00
Dominik Schilling
d3b3cc3fa5 Privacy: Don't show privacy feature pointer to new users.
Fixes #44062.
Built from https://develop.svn.wordpress.org/trunk@43259


git-svn-id: http://core.svn.wordpress.org/trunk@43088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 15:50:22 +00:00
Andrew Ozz
3ee58b55b1 Privacy: improve inline documentation.
Props desrosj.
Fixes #44075.
Built from https://develop.svn.wordpress.org/trunk@43256


git-svn-id: http://core.svn.wordpress.org/trunk@43085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 14:53:21 +00:00
Andrew Ozz
a75b113bed Privacy: fix two typos in WP_Privacy_Policy_Content::get_default_content().
Props dlh.
Fixes #44050.
Built from https://develop.svn.wordpress.org/trunk@43249


git-svn-id: http://core.svn.wordpress.org/trunk@43078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-13 11:15:21 +00:00
Andrew Ozz
b82fed1806 Privacy: require manage_privacy_options capability for showing WP_Privacy_Policy_Content::notice().
Props ocean90.
Fixes #44055.
Built from https://develop.svn.wordpress.org/trunk@43248


git-svn-id: http://core.svn.wordpress.org/trunk@43077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-13 11:04:21 +00:00
iandunn
7f23a920d2 Privacy: Reposition pointer to ensure dismiss link is always visible.
r43158 introduced a new admin pointer for the privacy tools added in 4.9.6. With the previous positioning, though, sometimes the `Dismiss` link would be fixed off screen, making it impossible for the user to dismiss the pointer. This happened when there were enough extra menu items, or when the viewport height was short enough.

This commit repositions the pointer to work around that problem. One down side of this workaround is that the arrow will not always be positioned next to the `Tools` menu, where it should be. That's an acceptable compromise given the current time constraints, though. A long term solution would be to make `WP_Pointer` robust enough to handle this use case.

Props imath, audrasjb, desrosj.
Fixes #44045.

Built from https://develop.svn.wordpress.org/trunk@43246


git-svn-id: http://core.svn.wordpress.org/trunk@43075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-12 17:29:21 +00:00
Andrew Ozz
1b1cc0b371 Privacy: make creating a privacy policy page on install multisite compatible.
See #43491.
Built from https://develop.svn.wordpress.org/trunk@43243


git-svn-id: http://core.svn.wordpress.org/trunk@43072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-11 15:44:21 +00:00
Andrew Ozz
5c5a527d96 Privacy: exclude the wrapper from the default policy content.
Fixes #44048.
Built from https://develop.svn.wordpress.org/trunk@43242


git-svn-id: http://core.svn.wordpress.org/trunk@43071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-11 15:07:21 +00:00
Sergey Biryukov
0a9de1ef2e Privacy: Normalize file paths in wp_privacy_generate_personal_data_export_file() to make sure Windows paths don't have their backslashes stripped.
Props xkon, pmbaldha.
Fixes #43908.
Built from https://develop.svn.wordpress.org/trunk@43234


git-svn-id: http://core.svn.wordpress.org/trunk@43063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 21:11:23 +00:00
Sergey Biryukov
bed52dda40 Privacy: Send an email notification to the user once their personal data erasure request is fulfilled.
Props desrosj, allendav, garrett-eclipse.
Fixes #43973.
Built from https://develop.svn.wordpress.org/trunk@43230


git-svn-id: http://core.svn.wordpress.org/trunk@43059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 20:43:22 +00:00
Sergey Biryukov
699cccd86e Privacy: Avoid a PHP notice in wp_ajax_wp_privacy_erase_personal_data(), make sure $eraser_key is always defined.
Props allendav.
Fixes #44040.
Built from https://develop.svn.wordpress.org/trunk@43228


git-svn-id: http://core.svn.wordpress.org/trunk@43057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 20:24:23 +00:00
iandunn
8af721fff8 Privacy: Replace intrusive policy update notice with menu bubbles.
Previously, when a plugin updated its suggested privacy policy text, an admin notice was shown on all screens in the Administration Panels. That was done in order to make sure that administrators were aware of it, so that they could update their policy if needed. That was a very heavy-handed and intrusive approach, though, which leads to a poor user experience, and notice fatigue. 

An alternative approach is to use bubble notifications in the menu, similar to when plugins have updates that need to be installed. That still makes it obvious that something needs the administrator's attention, but is not as distracting as a notice.

The notice will still appear on the Privacy page, though, since it is relevant to that screen, and provides an explanation of why the bubble is appearing.

Props azaozz, xkon, iandunn.
Fixes #43954. See #43953.

Built from https://develop.svn.wordpress.org/trunk@43223


git-svn-id: http://core.svn.wordpress.org/trunk@43052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 19:52:21 +00:00
Andrew Ozz
7d9265e5c5 Privacy: cleanup of the "Export Personal Data" and "Erase Personal Data" screens.
Props desrosj, xkon.
See #43929.
Built from https://develop.svn.wordpress.org/trunk@43212


git-svn-id: http://core.svn.wordpress.org/trunk@43041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 10:01:21 +00:00
iandunn
107b52191b Privacy: Reposition admin pointer to avoid covering collapsed menu.
Previously the pointer overlapped the menu in order to draw attention to the fact that it applies to both the `Tools` and `Settings` menus. That caused a conflict if the menu was collapsed, though, because the icons were covered by the pointer and therefore inaccessible.

Additionally, minor tweaks were made to the text order and formatting. The order of the two sections was swapped in the title and paragraph, in order to match the order of the corresponding menu items. The spacing around headings and paragraphs was tweaked to remove extraneous whitespace.

Props littler.chicken, desrosj, ianbelanger, melchoyce.
Fixes #43961.

Built from https://develop.svn.wordpress.org/trunk@43210


git-svn-id: http://core.svn.wordpress.org/trunk@43039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 03:03:20 +00:00
Sergey Biryukov
760ab78ff9 Privacy: Pass export request ID to wp_privacy_personal_data_export_file_created filter.
Props thomasplevy.
Fixes #44031.
Built from https://develop.svn.wordpress.org/trunk@43208


git-svn-id: http://core.svn.wordpress.org/trunk@43037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 23:18:22 +00:00
Sergey Biryukov
47e6c2f9ec Privacy: Make the help hint for Privacy Policy page more translatable and accessible.
Props tobifjellner.
See #43980.
Built from https://develop.svn.wordpress.org/trunk@43206


git-svn-id: http://core.svn.wordpress.org/trunk@43035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 23:12:21 +00:00
Andrew Ozz
35d5911ae8 Privacy: fixes for the privacy policy guide and suggested content:
- Separate the guide text form the suggested policy text.
- Add table of content for easier navigation.
- Move the content to tools.php (prevents the settings menu of being open).
- Add a link to the guide from the Privacy settings screen.

Props melchoyce, azaozz.
See #43980.
Built from https://develop.svn.wordpress.org/trunk@43203


git-svn-id: http://core.svn.wordpress.org/trunk@43032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 20:51:23 +00:00
Sergey Biryukov
367c2e945a Privacy: Add id attribute to WP_Privacy_Requests_Table and WP_Privacy_Data_Export_Requests_Table rows, for consistency with other post list tables.
Props desrosj.
Fixes #44015.
Built from https://develop.svn.wordpress.org/trunk@43191


git-svn-id: http://core.svn.wordpress.org/trunk@43020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 15:06:22 +00:00
iandunn
4467a9226c Privacy: Mark erasure requests as completed after processing.
r42986 introduced the beginnings of an Ajax handler for processing requests to erase personal data. At the time, a method for marking requests as completed was planned, but had not yet been created. This commit introduces that mechanism, bringing the erasure process closer to completion.

Props coreymckrill, allendav.
Fixes #43922.

Built from https://develop.svn.wordpress.org/trunk@43185


git-svn-id: http://core.svn.wordpress.org/trunk@43014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 01:02:22 +00:00
Andrew Ozz
3099f4d9ed Privacy: outputting the privacy policy guide and suggested content to a new page instead of a postbox.
Props melchoyce, azaozz.
See #43980.
Built from https://develop.svn.wordpress.org/trunk@43184


git-svn-id: http://core.svn.wordpress.org/trunk@43013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-08 23:45:21 +00:00
iandunn
76efbf47da Privacy: Mark processed requests as completed instead of confirmed.
r43008 refactored the request flow to make several improvements, but accidentally marked `completed` requests as `confirmed`. This commit restores the intended statuses, so that the data and corresponding UI reflect reality.

Props allendav, birgire.
Fixes #43913.

Built from https://develop.svn.wordpress.org/trunk@43183


git-svn-id: http://core.svn.wordpress.org/trunk@43012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-08 23:29:20 +00:00
iandunn
798e3dc84d Privacy: Reuse existing archive filenames to maintain URLs.
Whenever an admin initiates a download or email of a personal data export, a fresh copy of the file is generated. Previously, a new filename was used each time, which could lead to situations where a URL that was emailed to a data subject is broken.

That can be avoided by reusing the same filename when building fresh archives.

Props desrosj, tz-media, allendav.
Fixes #43905.

Built from https://develop.svn.wordpress.org/trunk@43180


git-svn-id: http://core.svn.wordpress.org/trunk@43009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-08 00:52:21 +00:00
John Blackbourn
bfba73995c Plugins: Correct another instance of incorrect parameter ordering when displaying plugins with more than one million active installations.
See #43193

Built from https://develop.svn.wordpress.org/trunk@43179


git-svn-id: http://core.svn.wordpress.org/trunk@43008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-07 21:43:20 +00:00
John Blackbourn
930c98b7d8 Plugins: Correct the parameters used when displaying plugins with more than one million active installations.
Fixes #43193

Built from https://develop.svn.wordpress.org/trunk@43178


git-svn-id: http://core.svn.wordpress.org/trunk@43007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-07 21:30:23 +00:00
John Blackbourn
8b34c79cec Docs: Update and correct various inline documentation.
See #42505, #41756

Built from https://develop.svn.wordpress.org/trunk@43177


git-svn-id: http://core.svn.wordpress.org/trunk@43006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-07 17:20:22 +00:00
Sergey Biryukov
8bc4e6d94f Privacy: Use the terms "erase"/"erasure" instead of "remove"/"removal" for personal data.
Props allendav.
Fixes #43920.
Built from https://develop.svn.wordpress.org/trunk@43175


git-svn-id: http://core.svn.wordpress.org/trunk@43004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-07 16:45:22 +00:00
Sergey Biryukov
cd4c960a6c Administration: Change all the occurrences of "(opens in a new window)" to "(opens in a new tab)".
Props chetan200891, ianbelanger, afercia.
Fixes #43803.
Built from https://develop.svn.wordpress.org/trunk@43174


git-svn-id: http://core.svn.wordpress.org/trunk@43003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-05 09:45:22 +00:00
Sergey Biryukov
daacd57fd4 Privacy: Change "Email Data" link text on "Export Personal Data" screen to "Send Export Link" for clarity.
Props birgire, ianbelanger.
Fixes #43964.
Built from https://develop.svn.wordpress.org/trunk@43172


git-svn-id: http://core.svn.wordpress.org/trunk@43001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-05 09:17:21 +00:00
Sergey Biryukov
f055261a05 Privacy: Remove stray closing tag in WP_Privacy_Policy_Content::get_default_content(), fix typo in @return tag.
Props dlh, tobifjellner.
Fixes #43951.
Built from https://develop.svn.wordpress.org/trunk@43170


git-svn-id: http://core.svn.wordpress.org/trunk@42999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-04 01:56:22 +00:00
Sergey Biryukov
abb666a812 Docs: Add missing duplicate hook comment for user_request_key_expiration filter.
Props birgire, desrosj.
Fixes #43934.
Built from https://develop.svn.wordpress.org/trunk@43168


git-svn-id: http://core.svn.wordpress.org/trunk@42997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-04 01:49:22 +00:00
iandunn
30b5cad03d Privacy: Add an admin pointer for new privacy features in 4.9.6.
The new features are very important for some users, because of their GDPR obligations. They're also spread across multiple top-level menus, making them less discoverable. An admin pointer will help to ensure that users are aware of the new tools and how to find them.

Props desrosj, andreamiddleton, allendav, xkon. 
Fixes #43942.

Built from https://develop.svn.wordpress.org/trunk@43158


git-svn-id: http://core.svn.wordpress.org/trunk@42987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 19:45:21 +00:00
iandunn
3d4c461e50 Privacy: Store plugin callbacks in associative array for flexibility.
The personal data export and erasure tools allow plugins to register their own callbacks, in order to add additional data to the export and erasure processes. Previously, these were registered without specifying a constant identifier in the array of callbacks. Using mutable integers makes it difficult for plugins to modify the callbacks of other plugins, though.

Using associative array keys instead provides a covenient and reliable way to identify and interact with another plugin's callbacks.

Props desrosj, allendav, ocean90.
Fixes #43931.

Built from https://develop.svn.wordpress.org/trunk@43154


git-svn-id: http://core.svn.wordpress.org/trunk@42983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 19:28:21 +00:00
Andrew Ozz
58b2e6e143 Privacy: use sprintf() in translations.
Props birgire.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43150


git-svn-id: http://core.svn.wordpress.org/trunk@42979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 18:25:21 +00:00
Andrew Ozz
7d4429b2c8 Privacy: fix typos and inconsistencies in the default suggested text.
Props macbookandrew.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43148


git-svn-id: http://core.svn.wordpress.org/trunk@42977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 17:42:22 +00:00
Andrew Ozz
c5d13c5934 Privacy: change how the default text for privacy policy is added:
- Insert both the text and tutorial in new policy pages and highlight is brightly in the editor.
- Show only the suggested text in the policy postbox.

Props melchoyce, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43146


git-svn-id: http://core.svn.wordpress.org/trunk@42975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-03 17:13:21 +00:00
Andrew Ozz
0d2eb27a5d Privacy: do not fold a single section in the privacy policy poxtbox.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43126


git-svn-id: http://core.svn.wordpress.org/trunk@42955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 22:10:21 +00:00
Andrew Ozz
dd68722112 Privacy: fix typo.
Props casiepa.
Fixes #43939.
Built from https://develop.svn.wordpress.org/trunk@43121


git-svn-id: http://core.svn.wordpress.org/trunk@42950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 20:07:22 +00:00
Andrew Ozz
3a43a64c20 Privacy: fix inconsistencies in new strings.
Props audrasjb.
Fixes #43925.
Built from https://develop.svn.wordpress.org/trunk@43118


git-svn-id: http://core.svn.wordpress.org/trunk@42947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 18:42:21 +00:00
Sergey Biryukov
6145ef6dea Docs: Correct DocBlock formatting for wp_privacy_personal_data_erasers filter.
See #43637.
Built from https://develop.svn.wordpress.org/trunk@43104


git-svn-id: http://core.svn.wordpress.org/trunk@42933 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 03:14:21 +00:00
Sergey Biryukov
eca2bf8545 I18N: Correct translator comment in wp_privacy_generate_personal_data_export_file().
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43089


git-svn-id: http://core.svn.wordpress.org/trunk@42918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:52:22 +00:00
Sergey Biryukov
14ab38be27 I18N: Use consistent pattern for placeholder references in translator comments in wp_ajax_wp_privacy_erase_personal_data().
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43088


git-svn-id: http://core.svn.wordpress.org/trunk@42917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:39:21 +00:00
iandunn
93a90a9aa4 Privacy: Limit export and erasure to super admins on Multisite.
Multisite networks have a variety of use cases, and in many of them single-site administrators are not trusted to take actions that affect the whole network, require making decisions about legal compliance, etc. By default, those actions should require super admin capabilities. Plugins can be used to override that behavior if a particular site's use case calls for it.

Props allendav, jeremyfelt, iandunn.
Fixes #43919.

Built from https://develop.svn.wordpress.org/trunk@43085


git-svn-id: http://core.svn.wordpress.org/trunk@42914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:07:22 +00:00
Sergey Biryukov
8e01f9f99b Privacy: Move "Mine" filter for media items above "Trash".
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43063


git-svn-id: http://core.svn.wordpress.org/trunk@42892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:47:21 +00:00
Sergey Biryukov
6c2470a091 I18N: Add context for "Mine" string added in [43056].
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43062


git-svn-id: http://core.svn.wordpress.org/trunk@42891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 21:37:23 +00:00
Andrew Ozz
2f321e234e Privacy: improve wp_privacy_erase_personal_data(), return boolean values.
Props ericdaams.
See #43602.
Built from https://develop.svn.wordpress.org/trunk@43061


git-svn-id: http://core.svn.wordpress.org/trunk@42890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:27:22 +00:00
Andrew Ozz
f376b6b0c9 Privacy: translate error messages, some fixes and improvements for the AJAX actions for exporting and erasing user data.
Props desrosj, birgire.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@43060


git-svn-id: http://core.svn.wordpress.org/trunk@42889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 19:00:20 +00:00
Andrew Ozz
2aa8414d09 Privacy: make the emails in export and erasure list-tables clickable.
Props birgire.
See #43911.
Built from https://develop.svn.wordpress.org/trunk@43057


git-svn-id: http://core.svn.wordpress.org/trunk@42886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 17:12:22 +00:00
Andrew Ozz
3266b10d04 Privacy: add "Mine" filter for media similarly to posts and comments.
Props audrasjb.
See #43820.
Built from https://develop.svn.wordpress.org/trunk@43056


git-svn-id: http://core.svn.wordpress.org/trunk@42885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 15:43:22 +00:00
Andrew Ozz
c77a8ed2fc Privacy: add attachments to the personal data export file.
Props allendav.
See #43883.
Built from https://develop.svn.wordpress.org/trunk@43054


git-svn-id: http://core.svn.wordpress.org/trunk@42883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 13:45:21 +00:00
Andrew Ozz
237df3367b Privacy: only fold the sections in the privacy policy poxtbox when more than one.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43052


git-svn-id: http://core.svn.wordpress.org/trunk@42881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-01 09:48:21 +00:00
Andrew Ozz
d1ab641d16 Privacy: edits and improvements for the default text for a privacy policy.
Props idea15, allendav.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43048


git-svn-id: http://core.svn.wordpress.org/trunk@42877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:06:21 +00:00
iandunn
9abc0fe73e Privacy: Add wp_privacy_personal_data_export_file_created filter.
This runs immediately after the data export file has been successfully created, allowing plugins to introduce some workflow customizations. For example, a plugin could password-protect the export file, for peace of mind, even though the CSPRN in the filename makes brute force attacks nearly impossible.

See #43546.

Built from https://develop.svn.wordpress.org/trunk@43047


git-svn-id: http://core.svn.wordpress.org/trunk@42876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 21:04:22 +00:00
iandunn
23bf0c7535 Privacy: Add cron to delete expired export files to protect privacy.
The primary means of protecting the files is the CSPRN appended to the filename, but there is no reason to keep the files after the data subject has downloaded them, so deleting them provides an additional layer of protection. Previously this was done from `wp_privacy_generate_personal_data_export_file()`, but that does not guarantee that it will be run regularly, and on smaller sites that could result in export files being exposed for much longer than necessary.

`wp_privacy_delete_old_export_files()` was moved to a front end file, so that it can be called from `cron.php`.

This introduces the `wp_privacy_export_expiration` filter, which allows plugins to customize how long the exports are kept before being deleted.

`index.html` was added to the `$exclusions` parameter of `list_files()` to make sure that it isn't deleted. If it were, then poorly-configured servers would allow the directory to be traversed, exposing all of the exported files.

Props iandunn, desrosj.
See #43546.

Built from https://develop.svn.wordpress.org/trunk@43046


git-svn-id: http://core.svn.wordpress.org/trunk@42875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 20:09:23 +00:00
iandunn
5b4aa26436 Privacy: Use a CSPRNG in export filenames for more security.
`rand()` is deterministic and therefore offers much less protection in this context. `wp_generate_password()` is a convenient wrapper around `wp_rand()`, which uses `random_int()` to generate cryptographically-secure psuedorandom numbers.

See #43546.

Built from https://develop.svn.wordpress.org/trunk@43045


git-svn-id: http://core.svn.wordpress.org/trunk@42874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 18:53:25 +00:00
Andrew Ozz
c21c4e25b3 Privacy: add default text for a privacy policy. First run.
Props xkon, idea15, allendav, azaozz.
See #43473.
Built from https://develop.svn.wordpress.org/trunk@43044


git-svn-id: http://core.svn.wordpress.org/trunk@42873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-30 14:47:21 +00:00
Sergey Biryukov
00ae0a1097 Docs: Remove backtick-escaping around a core function in the hook docs for the pre_prepare_themes_for_js filter.
This allows the function to be auto-linked in the Developer Reference. Added in [42877].

See #42505.
Built from https://develop.svn.wordpress.org/trunk@43024


git-svn-id: http://core.svn.wordpress.org/trunk@42853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 21:47:22 +00:00
Andrea Fercia
8d9f1ae0d5 Accessibility: Better color contrast for the tables pagination links.
By making the pagination links use the default style for buttons, color contrast
is improved and the CSS is simplified. Improves consistency with other UI controls.
Also, slightly increases the white space below the pagination links.

Props benoitchantre, afercia.
Fixes #41858.

Built from https://develop.svn.wordpress.org/trunk@43019


git-svn-id: http://core.svn.wordpress.org/trunk@42848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-29 16:25:21 +00:00
Andrew Ozz
b044b4053e Privacy: add means to export personal data by username or email address. Generate a zipped export file containing all data. First run.
Props allendav.
See #43546.
Built from https://develop.svn.wordpress.org/trunk@43012


git-svn-id: http://core.svn.wordpress.org/trunk@42841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 19:54:21 +00:00
Andrew Ozz
e9eb7518c0 Privacy: update and enhance the method to confirm user requests by email. Introduce WP_User_Request to hold all request vars similarly to WP_Post.
Props mikejolley.
See #43443.

Built from https://develop.svn.wordpress.org/trunk@43011


git-svn-id: http://core.svn.wordpress.org/trunk@42840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 17:31:22 +00:00
Andrew Ozz
f1703c0e70 Privacy: update the method to confirm user requests by email. Use a single CPT to store the requests and to allow logging/audit trail.
Props mikejolley.
See #43443.

Built from https://develop.svn.wordpress.org/trunk@43008


git-svn-id: http://core.svn.wordpress.org/trunk@42837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-27 10:12:22 +00:00
Felix Arntz
6b2e34f703 General: Implement editorial, design and accessibility feedback for the PHP version nag.
The updated version of the nag is shorter, more on point and less aggressive than the previous one. It integrates better with the other dashboard widgets and fixes several accessibility concerns. A yellow warning color is used when the current PHP version is outdated, a red error color is used when it is also insecure.

Props afercia, birgire, danieltj, flixos90, johnjamesjacoby, karmatosed, Luciano Croce, nerrad, pento, schlessera, SergeyBiryukov, sonjaleix.

Fixes #41191.

Built from https://develop.svn.wordpress.org/trunk@43006


git-svn-id: http://core.svn.wordpress.org/trunk@42835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-26 14:31:24 +00:00
Andrew Ozz
41a82d6078 Privacy: add better docs for wp_add_privacy_policy_content() and WP_Privacy_Policy_Content::add().
See #43620.
Built from https://develop.svn.wordpress.org/trunk@43003


git-svn-id: http://core.svn.wordpress.org/trunk@42832 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-25 18:10:21 +00:00
Andrew Ozz
13875fbddb Privacy: fix styling of counts on the list tables for user requests.
Props allendav.
Fixes #43846.
Built from https://develop.svn.wordpress.org/trunk@43000


git-svn-id: http://core.svn.wordpress.org/trunk@42829 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:35:21 +00:00
Andrew Ozz
11e315ca23 Make the string WordPress translatable.
Props mnelson4.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42999


git-svn-id: http://core.svn.wordpress.org/trunk@42828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 21:23:21 +00:00
Felix Arntz
c1efc2519b Plugins: Show the required PHP version in the plugin details view, if specified.
Props xkon.
Fixes #43650.

Built from https://develop.svn.wordpress.org/trunk@42998


git-svn-id: http://core.svn.wordpress.org/trunk@42827 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-24 11:41:25 +00:00
Andrew Ozz
891deab7c5 Privacy: make the sections in the suggested privacy policy text postbox foldable. Add Read More/Read Less buttons. Fix copying of the suggested text by pressing the button.
Props melchoyce, xkon, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42992


git-svn-id: http://core.svn.wordpress.org/trunk@42821 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-19 12:39:21 +00:00
Andrew Ozz
b4fdb9ebf2 Privacy: add means to erase personal data by username or email address. First run.
Props allendav, coreymckrill, ericdaams, azaozz.
See #43637, #43602.
Built from https://develop.svn.wordpress.org/trunk@42986


git-svn-id: http://core.svn.wordpress.org/trunk@42815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-18 22:30:22 +00:00
Andrew Ozz
8d9e4937f8 Fix typo in 'wp_get_default_privacy_policy_content' filter.
Props claudiu.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42985


git-svn-id: http://core.svn.wordpress.org/trunk@42814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-17 21:09:20 +00:00
Sergey Biryukov
acd3f4cb10 I18N: Use consistent pattern for placeholder references in a translator comment in media_upload_max_image_resize().
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42984


git-svn-id: http://core.svn.wordpress.org/trunk@42813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:37:20 +00:00
Sergey Biryukov
3957635dfb I18N: Correct placeholder references in a translator comment in wp_print_file_editor_templates().
Props afercia.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@42983


git-svn-id: http://core.svn.wordpress.org/trunk@42812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 18:36:24 +00:00
Andrew Ozz
280aeff5d2 Fix typo (missing !).
See #43491.
Built from https://develop.svn.wordpress.org/trunk@42982


git-svn-id: http://core.svn.wordpress.org/trunk@42811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 10:14:21 +00:00
Andrew Ozz
f1e065b13b Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.

Fixes #43491.
Built from https://develop.svn.wordpress.org/trunk@42981


git-svn-id: http://core.svn.wordpress.org/trunk@42810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 09:00:20 +00:00
Andrew Ozz
3108d2ffb2 Privacy: add a postbox that is shown when editing the privacy policy page, and where plugins and core will output suggested content and additional privacy info. First run.
Props melchoyce, azaozz.
See #43620.
Built from https://develop.svn.wordpress.org/trunk@42980


git-svn-id: http://core.svn.wordpress.org/trunk@42809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 08:53:20 +00:00
Andrew Ozz
600c5082a3 Privacy: fix error message and list table sorting errors on the Export Personal Data and Remove Personal Data screens.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42977


git-svn-id: http://core.svn.wordpress.org/trunk@42806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 16:15:21 +00:00
Dominik Schilling
3b76937ec8 Administration: Avoid an extra space in the admin body class.
Props jainnidhi, rhetorical, birgire, mathieuhays.
Fixes #43465.
Built from https://develop.svn.wordpress.org/trunk@42974


git-svn-id: http://core.svn.wordpress.org/trunk@42803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-13 14:03:20 +00:00
Andrew Ozz
5493d8b253 Privacy: add helper function for anonymizing data in a standardized way.
Props jesperher, allendav, iandunn, birgire, azaozz.
Fixes #43545.
Built from https://develop.svn.wordpress.org/trunk@42971


git-svn-id: http://core.svn.wordpress.org/trunk@42800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-12 21:20:23 +00:00
iandunn
057cef802a Dashboard: Strip more extraneous IP parts to prevent PHP warnings.
This iterates on earlier versions of the code, in order to handle more edge cases. An arbitrary string like `or=\"` will now be stripped, as well as reachability scopes like `%eth0`.

Props eamax, soulseekah, iandunn.
Fixes #41083.

Built from https://develop.svn.wordpress.org/trunk@42968


git-svn-id: http://core.svn.wordpress.org/trunk@42797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 23:19:30 +00:00
Andrew Ozz
108578a8ec Privacy: add new wp-admin screens for exporting and removing of personal data.
Props @melchoyce, @mikejolley, @allendav, @xkon.
See #43481.
Built from https://develop.svn.wordpress.org/trunk@42967


git-svn-id: http://core.svn.wordpress.org/trunk@42796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 18:02:30 +00:00
Adam Silverstein
d1d6e8864e Revisions: improve show_split_view=false support for title.
* When show_split_view argument false, show title changes in a single column and only show title once if title is unchanged.

Props johnbillion, mbelchev.
Fixes #42402.  


Built from https://develop.svn.wordpress.org/trunk@42966


git-svn-id: http://core.svn.wordpress.org/trunk@42795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-10 16:12:30 +00:00
Felix Arntz
921e131eae General: Improve wording for PHP version nag.
This changeset adjusts the tone of the message to fit the usual core voice better and addresses accessibility concerns.

Props schlessera.
See #41191.

Built from https://develop.svn.wordpress.org/trunk@42891


git-svn-id: http://core.svn.wordpress.org/trunk@42721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-02 10:15:33 +00:00
Andrew Ozz
a4beb40d0b Privacy: add support for exporting multiple pages of personal data.
Props allendav.
See #43438.
Built from https://develop.svn.wordpress.org/trunk@42889


git-svn-id: http://core.svn.wordpress.org/trunk@42719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-28 19:28:31 +00:00
Sergey Biryukov
ff314fd156 Media: Pass EXIF data to the wp_read_image_metadata filter.
Props desrosj.
Fixes #43624.
Built from https://develop.svn.wordpress.org/trunk@42879


git-svn-id: http://core.svn.wordpress.org/trunk@42709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:45:29 +00:00
Sergey Biryukov
079cfd60a9 Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.
See #43624.
Built from https://develop.svn.wordpress.org/trunk@42878


git-svn-id: http://core.svn.wordpress.org/trunk@42708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 20:41:29 +00:00
John Blackbourn
bbcb4300a3 Docs: Correct and improve various inline documentation.
See #42505

Built from https://develop.svn.wordpress.org/trunk@42877


git-svn-id: http://core.svn.wordpress.org/trunk@42707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 19:35:29 +00:00
John Blackbourn
b13e73d05c Docs: Document more parameters and properties using typed array notation.
See #41756

Built from https://develop.svn.wordpress.org/trunk@42875


git-svn-id: http://core.svn.wordpress.org/trunk@42705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-25 18:10:32 +00:00
Sergey Biryukov
0895f04705 Docs: Correct method reference in a comment for Bulk_Plugin_Upgrader_Skin::$plugin_info.
See [42677] for `Bulk_Theme_Upgrader_Skin::$theme_info`.

See #42505.
Built from https://develop.svn.wordpress.org/trunk@42873


git-svn-id: http://core.svn.wordpress.org/trunk@42703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-23 00:34:29 +00:00
John Blackbourn
18169f0ae1 Docs: Revert some sneaky debugging code.
See #41756

Built from https://develop.svn.wordpress.org/trunk@42872


git-svn-id: http://core.svn.wordpress.org/trunk@42702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:29:30 +00:00
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

Built from https://develop.svn.wordpress.org/trunk@42871


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Dominik Schilling
61ba57abb7 Users: Use promote_users for role updates in edit_user().
`edit_user()` can also update user roles but was still using the `edit_users` capability instead of the newer `promote_users` capability introduced in [14176].
This makes the role handling consistent with the bulk dropdown menu for role changes.

Props flixos90, johnjamesjacoby, ocean90.
Fixes #42564.
Built from https://develop.svn.wordpress.org/trunk@42855


git-svn-id: http://core.svn.wordpress.org/trunk@42685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-19 20:29:34 +00:00
Dominik Schilling
5c291d49de Pinking shears.
See #41057.
Built from https://develop.svn.wordpress.org/trunk@42843


git-svn-id: http://core.svn.wordpress.org/trunk@42673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-18 14:23:33 +00:00
Felix Arntz
176a289050 Multisite: Introduce metadata for sites.
A new global multisite table `wp_blogmeta` is added to the database schema, and a set of `*_site_meta()` API functions are introduced.

The implementation fails gracefully when the new table is not yet available, which may happen especially shortly after the core update, before the network has been upgraded to the new database schema. The presence of the table is detected once and stored as a global setting on the main network.

Core does not yet use site metadata, but there are several use-cases to be implemented or explored in the near future, and it allows plugins to extend sites with arbitrary data, which will come in particularly handy with the upcoming REST API endpoint for sites.

Props spacedmonkey, johnjamesjacoby, jeremyfelt, flixos90.
Fixes #37923.

Built from https://develop.svn.wordpress.org/trunk@42836


git-svn-id: http://core.svn.wordpress.org/trunk@42666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-16 02:15:31 +00:00
Felix Arntz
ed1df81bba General: Introduce dashboard widget to inform administrators about outdated PHP versions.
This new dashboard widget is shown on WordPress sites which are powered by a PHP version which WordPress considers outdated, in order to inform site owners about the resulting problems and to explain how to upgrade to a supported version. An education page for that purpose has been previously created that the widget links to. The link is translatable so that localized versions of the page can be referred to as they become available.

The nag follows the example of the Browse Happy dashboard widget and is only visible for administrators, or network administrators when using multisite. To determine whether it needs to be displayed, a new wordpress.org API introduced prior is called that handles the version logic in a centralized location.

Props flixos90, hedgefield, schlessera.
Fixes #41191.

Built from https://develop.svn.wordpress.org/trunk@42832


git-svn-id: http://core.svn.wordpress.org/trunk@42662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 16:43:31 +00:00
John Blackbourn
d7025e7787 Security: Loosen the admin referrer policy header value to allow the referring host to be sent from the admin area in all cases.
This allows referrer-restricted content from third parties (such as images and fonts) to continue working in the admin area.

Props aranwer104, qcmiao

Fixes #43285

Built from https://develop.svn.wordpress.org/trunk@42830


git-svn-id: http://core.svn.wordpress.org/trunk@42660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 10:57:35 +00:00
Dion Hulse
42b03122b5 Plugins: Add support for plugins having an active_installs value larger than 1 million.
WordPress.org currently supports up to 5 million, and with the growth of WordPress, it's expected that that upper bound will increase in the future.

Fixes #43193.

Built from https://develop.svn.wordpress.org/trunk@42829


git-svn-id: http://core.svn.wordpress.org/trunk@42659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-12 01:57:31 +00:00
Sergey Biryukov
4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +00:00
Sergey Biryukov
fab939595d Docs: Fix typo in a comment in WP_Community_Events::trim_events().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42826


git-svn-id: http://core.svn.wordpress.org/trunk@42656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:35:31 +00:00
Sergey Biryukov
15e969be8d Docs: Add missing brace in auto_update_{$type} filter DocBlock.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42825


git-svn-id: http://core.svn.wordpress.org/trunk@42655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 10:30:33 +00:00
Andrea Fercia
ffedf3d752 Accessibility: Widgets: Make the "Available Widgets" section operable with a keyboard.
For a number of years, the "Available Widgets" section has been off-limits for
keyboard users. Now it can be used also with the keyboard. This change introduces
also some improvements for assistive technologies.

- makes the widget toggles focusable and adds an `aria-expanded` attribute to indicate their state
- improves the toggles labelling to clarify context (add/edit)
- changes the controls to choose a sidebar from list items to buttons
- adds an `aria-label` attribute to the buttons to clarify their purpose
- adds an `aria-pressed` attribute to the buttons to indicate which one is selected
- improves color contrast of the selected button
- uses a `wp.a11y.speak()` message to announce to screen reader users when a widget has been added to a sidebar
- moves focus back to the toggle button when closing a widget

See #40677.

Built from https://develop.svn.wordpress.org/trunk@42794


git-svn-id: http://core.svn.wordpress.org/trunk@42624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 22:27:31 +00:00
Mike Schroder
51b0a3cd28 Media: Correctly allow changing PDF thumbnail crop value.
Corrects logic that keeping plugins from setting crop value of intermediate image sizes for rendered PDFs.

Adds test.

Props leemon, SergeyBiryukov, chetan200891, birgire.
Fixes #43226.
Built from https://develop.svn.wordpress.org/trunk@42792


git-svn-id: http://core.svn.wordpress.org/trunk@42622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-07 01:19:31 +00:00
Andrea Fercia
6a4b2a022a Accessibility: Make the Widgets screen "Enable accessibility mode" link more discoverable.
For a number of years, the link to the Widgets screen "Accessibility mode" lived
in the Screen Options panel, hidden by default. Many users, including assistive
technologies users, weren't able to find it or even aware it existed. By bringing
the link in the main screen, visible by default, this change makes the
"Accessibility mode" easily discoverable for everyone.

Props chetan200891, antonioeatgoat.
Fixes #42778.

Built from https://develop.svn.wordpress.org/trunk@42790


git-svn-id: http://core.svn.wordpress.org/trunk@42620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-06 17:21:33 +00:00