38150 Commits

Author SHA1 Message Date
Sergey Biryukov
9c26acf935 Privacy: Use the terms "erase"/"erasure" instead of "remove"/"removal" for personal data.
Props allendav.
Merges [43175] to the 4.9 branch.
Fixes #43920.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43176 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-07 16:45:42 +00:00
Sergey Biryukov
497959661c Privacy: Change "Email Data" link text on "Export Personal Data" screen to "Send Export Link" for clarity.
Props birgire, ianbelanger.
Merges [43172] to the 4.9 branch.
Fixes #43964.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43173 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-05 09:22:23 +00:00
Sergey Biryukov
060892dec7 Privacy: Remove stray closing tag in WP_Privacy_Policy_Content::get_default_content(), fix typo in @return tag.
Props dlh, tobifjellner.
Merges [43170] to the 4.9 branch.
Fixes #43951.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43171 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-04 01:56:49 +00:00
Sergey Biryukov
4e93444320 Docs: Add missing duplicate hook comment for user_request_key_expiration filter.
Props birgire, desrosj.
Merges [43168] to the 4.9 branch.
Fixes #43934.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43169 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-04 01:48:52 +00:00
Sergey Biryukov
606d22c898 Customize: Correct closing tag in WP_Customize_Theme_Control::content_template().
Props itowhid06.
Merges [43166] to the 4.9 branch.
Fixes #43945.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43167 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-04 01:04:59 +00:00
Ian Dunn
9760ed6bad Post WordPress 4.9.6 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43165 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 21:58:34 +00:00
Ian Dunn
c6272b7196 WordPress 4.9.6 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43164 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 21:29:47 +00:00
Andrew Ozz
ec4aebb741 Privacy: Return before scheduling cron during install to avoid error.
r43046 introduced wp_schedule_delete_old_privacy_export_files() to schedule the wp_privacy_delete_old_export_files cron job, but it did not check to make sure it wasn't running in the context of the install process. When it did run in that context, it created a database error, because the necessary database tables don't exist at that point.

Checking the current context and returning early during the installation phase avoids that issue.

Props helen, timothyblynjacobs, iandunn.
Merges [43162] to the 4.9 branch.
Fixes #43952.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43163 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 21:14:43 +00:00
Andrew Ozz
bd36463305 Privacy: Redirect to newly created Privacy Policy page to improve UX.
Previously the user was shown a message that the page was created, but might not understand that they still need to visit the page and publish it. Redirecting them to the page makes it more obvious that additional steps are involved.

Props Clorith, xkon, azaozz.
Merges [43160] to the 4.9 branch.
Fixes #43926.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43161 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 20:09:35 +00:00
Andrew Ozz
4133b53842 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.
Merges [43158] to the 4.9 branch.
Fixes #43942.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43159 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:51:10 +00:00
Andrew Ozz
217e6e54e0 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.
Merges [43154] to the 4.9 branch.
Fixes #43931.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43157 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:37:32 +00:00
Andrew Ozz
bb3e7f4779 Privacy: rename manage_privacy_policy to manage_privacy_options.
Props desrosj.
Merges [43155] to the 4.9 branch.
Fixes #43935.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43156 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 19:34:21 +00:00
Andrew Ozz
64279d7f38 Privacy: Limit Privacy Settings screen to Super Admins in Multisite.
In many common Multisite use cases, the network administrator will want to set a network-wide privacy policy -- via the privacy_policy_url filter -- for consistency and convenience. When that's done, the Privacy Settings screen on individual sites becomes unnecessary, and may confuse administrators of those sites when they see that their changes don't have any effect on the policy link in the footer.

Since we can't programatically determine which behavior the network admins would like, the safest default setting is to restrict the ability to super admins, and let them delegate it to individual site owners via a plugin, if they'd like to.

Merhes [43147] to the 4.9 branch.
Fixes #43935.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43153 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 18:41:18 +00:00
Andrew Ozz
f62e44af9f Privacy: Move privacy policy page to Settings menu for consistency.
The page was originally placed under Tools so that it would be grouped with the pages to export and erase personal data, since they're all part of the effort to bring privacy management tools to Core ahead of GDPR's deadline. After more consideration, though, it makes sense to move this page to the Settings menu, since it's fundamental purpose is to configure an option, rather than to facilitate a recurring task. This keeps all of the configuration pages in a single place, making them consistent and easier to find.

Exporting and erasing personal data are recurring tasks, so they still make sense under the Tools menu.

Props xkon, helen, melchoyce, allendav, desrosj, ocean90, azaozz.
Merges [43145] to the 4.9 branch.
Fixes #43873.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43152 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 18:31:59 +00:00
Andrew Ozz
17a318b134 Privacy: use sprintf() in translations.
Props birgire.
Merges [43150] to the 4.9 branch.
See #43473.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43151 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 18:27:17 +00:00
Andrew Ozz
42e742a7cd Privacy: add default text for a privacy policy including a tutorial on now to create one.
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, idea15, allendav, xkon, macbookandrew, azaozz.
Merges [43044], [43048], [43052], [43126], [43146], and [43148] to the 4.9 branch.
Fixes #43473.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43149 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 17:58:40 +00:00
Andrew Ozz
7eb44af1b1 Privacy: fix displaying of messages during personal data erasure.
Props allendav.
Merges [43139] to the 4.9 branch.
Fixes #43943.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43140 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 09:25:50 +00:00
Sergey Biryukov
7367445218 REST API: When handling who=authors query parameter for GET wp/v2/users, only check edit_posts for post types that support author.
Props danielbachhuber.
Merges [43137] to the 4.9 branch.
Fixes #42202.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43138 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 06:53:09 +00:00
Sergey Biryukov
7bfeecac51 Media: Add aac to the list of allowed file types.
Props desrosj.
Merges [42697] and [43135] to the 4.9 branch.
Fixes #42919.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43136 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 06:41:48 +00:00
Sergey Biryukov
f1bac48fb1 Privacy: Uncapitalize "privacy policy" when used in a sentence.
In these contexts, "privacy policy" is not a proper noun, and therefore should not be capitalized.

The remaining uses are page titles and section headers, where capitalization is appropriate.

Props idea15, garrett-eclipse, allendav.
Merges [43132] to the 4.9 branch.
Fixes #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43134 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 05:30:36 +00:00
Sergey Biryukov
4b2768da01 Privacy: Revise Privacy Policy page text to avoid misunderstanding.
The previous sentence was gramatically awkward, and using the term "compliance" could accidentally be mistaken by a site owner for a promise by WordPress that their site will be compliant after using the tool, which is not necessarily true.

Props idea15, allendav, azaozz, iandunn.
Merges [43131] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43133 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-03 05:29:36 +00:00
Sergey Biryukov
17c2c72c80 Comments: Move comment consent input outside the label for a11y.
Non-wrapping `label`s are more widely supported by assitive technologies. The CSS changes account for the element re-ordering, and tweak the formatting for improved readability.

Props afercia, xkon, laurelfulford, azaozz.
Merges [43125] to the 4.9 branch.
Fixes #43436.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43130 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 22:14:59 +00:00
Sergey Biryukov
88335acc0e Privacy: Use "website" in comment cookie consent text for clarity.
The term "URL" is technical jargon which will not be familiar to all commenters. "Website" is more universal, and matches the label on the url input field.

Props johnjamesjacoby, allendav, azaozz.
Merges [43123] to the 4.9 branch.
See #43436.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43129 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 22:13:24 +00:00
Sergey Biryukov
f135660f52 Respect the commenter decision when they have checked the checkbox to consent to cookies, and keep it checked when they reload the page or post another comment.
Props azaozz.
Merges [42815] to the 4.9 branch.
See #43436.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43128 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 22:12:28 +00:00
Sergey Biryukov
b99fbcbec5 Add a checkbox to the comment form so logged out users can opt-out of commenter cookies.
Props lakenh, xkon, birgire, azaozz, johnbillion.
Merges [42772] and [43042] to the 4.9 branch.
See #43436.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43127 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 22:10:30 +00:00
Sergey Biryukov
db99cd18b9 Privacy: Add policy link to login screen.
Personal data collection is more likely for registered users than casual visitors, and the privacy policy might have been updated since a user last logged in. Those changes could impact the collection of personal data from registered users, so it makes sense to provide a link to the policy before users log in.

Props voneff, xkon, melchoyce, chetan200891, desrosj.
Merges [43120] to the 4.9 branch.
Fixes #43721.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43124 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 21:59:34 +00:00
Andrew Ozz
13a5d522bc Privacy: fix typo.
Props casiepa.
Merges [43121] to the 4.9 branch.
Fixes #43939.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43122 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 20:08:00 +00:00
Andrew Ozz
a731b77030 Privacy: fix inconsistencies in new strings.
Props audrasjb.
Merges [43118] to the 4.9 branch.
Fixes #43925.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43119 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 18:50:49 +00:00
Sergey Biryukov
b1b7009e55 Privacy: add user information to the personal data export file.
Props TZ-Media, desrosj.
Merges [43055] and [43116] to the 4.9 branch.
See #43547.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43117 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 04:20:35 +00:00
Sergey Biryukov
2363000d87 Privacy: add better docs for wp_add_privacy_policy_content() and WP_Privacy_Policy_Content::add().
Props azaozz.
Merges [43003] to the 4.9 branch.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43115 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:56:03 +00:00
Sergey Biryukov
e5785300b2 Make the string WordPress translatable.
Props mnelson4.
Merges [42999] to the 4.9 branch.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43114 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:54:05 +00:00
Sergey Biryukov
3aa67d2bf3 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.
Merges [42992] to the 4.9 branch.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43113 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:53:15 +00:00
Sergey Biryukov
fa0102485e Fix typo in 'wp_get_default_privacy_policy_content' filter.
Props claudiu.
Merges [42985] to the 4.9 branch.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43112 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:51:15 +00:00
Sergey Biryukov
e8e4f97a73 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.
Merges [43085] to the 4.9 branch.
Fixes #43919.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43111 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:48:27 +00:00
Sergey Biryukov
c9b8dffac9 Privacy: improve wp_privacy_erase_personal_data(), return boolean values.
Props ericdaams.
Merges [43061] to the 4.9 branch.
See #43602.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43110 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:43:37 +00:00
Sergey Biryukov
c3a2cff3f8 Privacy: Add template tags for building link to privacy policy page.
This introduces the `get_the_privacy_policy_link()` and `the_privacy_policy_link()` functions, as well as the `privacy_policy_url` filter.

A new `tests/url/` folder was added to better organize tests related to `get_*_url()` functions. Previously, those tests were placed in `tests/url.php` and `tests/link/`, but neither of those locations are optimal. Placing tests in `tests/url.php` violates the guideline of creating separate files/classes for each function under test, and using `tests/link/` conflates two distinct -- albeit related -- groups of functions. Over time, URL-related tests can be migrated to the new folder.

Props birgire, xkon, azaozz, iandunn.
Merges [43002] to the 4.9 branch.
See #43850.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43109 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:38:23 +00:00
Sergey Biryukov
a9dac1d567 Privacy: add attachments to the personal data export file.
Props allendav.
Merges [43054] to the 4.9 branch.
See #43883.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43108 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:33:22 +00:00
Sergey Biryukov
2d95d0744e I18N: Use consistent pattern for placeholder references in translator comments in wp_ajax_wp_privacy_erase_personal_data().
Merges [43088] to the 4.9 branch.
See #43438.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43107 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:23:58 +00:00
Sergey Biryukov
1fda38f83b Docs: Correct DocBlock formatting for wp_privacy_personal_data_erasers filter.
Merges [43104] to the 4.9 branch.
See #43637.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43106 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:19:54 +00:00
Sergey Biryukov
a0fa0cc602 Privacy: translate error messages, some fixes and improvements for the AJAX actions for exporting and erasing user data.
Props desrosj, birgire.
Merges [43060] to the 4.9 branch.
See #43438.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43105 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:18:19 +00:00
Sergey Biryukov
1fedcb92e2 Privacy: fix and improve the help text about adding a privacy policy page.
Props idea15, xkon.
Merges [43053] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43103 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 03:01:03 +00:00
Sergey Biryukov
9d09393bdf Privacy: fix get_privacy_policy_url() to only return the URL when the page is published.
Props azaozz.
Merges [42995] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43102 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:59:49 +00:00
Sergey Biryukov
45ad7dce3a 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.
Merges [42980] to the 4.9 branch.
See #43620.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43101 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:58:12 +00:00
Sergey Biryukov
5385778b73 Privacy: improve the screen for setting a privacy policy page.
Props melchoyce, xkon, azaozz.
Merges [42978] and [43091] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43100 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:49:55 +00:00
Sergey Biryukov
f7e3b58c18 Accessibility improvements for the Privacy Tools screen.
Props afercia.
Merges [42823] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43099 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:47:23 +00:00
Sergey Biryukov
2f90605ce5 Add Privacy Tools admin page under the Tools menu.
Props allendav, xkon, azaozz.
Merges [42814] to the 4.9 branch.
See #43435.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43098 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:45:22 +00:00
Sergey Biryukov
6ed9d96894 Privacy: Include wp-admin/includes/file.php to avoid fatal error.
`list_files()` is defined in `wp-admin/includes/file.php`, which is not included by `wp-cron.php`, so it needs to be included by the caller in order to avoid a fatal PHP error.

This bug was not detected during testing because the file _is_ included when executing jobs via `wp cron event run`.

Props mikejolley, iandunn.
Merges [43059] to the 4.9 branch.
See #43546.
See https://wordpress.slack.com/archives/C9695RJBW/p1525190405000860.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43097 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:37:50 +00:00
Sergey Biryukov
c61485d4cd 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.

Props iandunn.
Merges [43047] to the 4.9 branch.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43096 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:34:57 +00:00
Sergey Biryukov
ad1b9dd4bd 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.
Merges [43046] to the 4.9 branch.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43095 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:32:57 +00:00
Sergey Biryukov
f7518bfc6b 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.

Props iandunn.
Merges [43045] to the 4.9 branch.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43094 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-02 02:18:48 +00:00