Commit Graph

25502 Commits

Author SHA1 Message Date
Sergey Biryukov
b4320bcd8f Docs: Add missing documentation and duplicate hook references for wp_privacy_personal_data_export_file, wp_privacy_personal_data_exporters, and wp_privacy_personal_data_erasers hooks.
Props birgire.
See #44125.
Built from https://develop.svn.wordpress.org/trunk@43303


git-svn-id: http://core.svn.wordpress.org/trunk@43132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-21 13:03:21 +00:00
Sergey Biryukov
35f94eb211 Privacy: Correct the error check when creating an export folder in wp_privacy_generate_personal_data_export_file().
`wp_mkdir_p()` returns `false` on error, not a `WP_Error` object.

Props birgire.
Fixes #44158.
Built from https://develop.svn.wordpress.org/trunk@43299


git-svn-id: http://core.svn.wordpress.org/trunk@43128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-21 11:59:24 +00:00
laurelfulford
12737b798b Bundled Themes: Bump version numbers and update changelogs for 4.9.6 release
* Also, updates POT files for Twenty Ten and Twenty Eleven.

Props earnjam, laurelfulford.

Fixes #43915.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-17 17:07:22 +00:00
iandunn
00571b621c Tests: Add case for wp_privacy_delete_old_export_files().
Props allendav.
See #43546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-17 16:39:22 +00:00
iandunn
da2f23fa23 Tests: Add case for wp_privacy_send_personal_data_export_email().
Props birgire.
See #43546.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-16 23:54:20 +00:00
iandunn
2754419731 Comments: Escape permalink values on edit screen to prevent XSS.
There doesn't appear to be any way for an attacker to introduce malicious input into the URL, unless a plugin is filtering the URL to add it, but it's better to be safe than sorry.

Props 1naveengiri, joyously.
Fixes #44115.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-16 22:39:21 +00:00
iandunn
461d17576c Privacy: Require manage_privacy_options to edit policy page.
A user is required to have the `manage_privacy_options` capability in order to determine which page is set as the privacy policy (the `wp_page_for_privacy_policy`). Given that, it doesn't make sense to allow users without that capability to edit or delete the page. 

A similar situation exists with the `page_for_posts` and `page_on_front` options, but Editors are allowed to edit those pages. The reason that this situation is different is because it is more likely that an administrator will want to restrict modifications to the privacy policy, than it is that they will want to allow modifications. Modifications to the policy often require specialized knowledge of local laws, and can have implications for compliance with those laws.

Props dlh, desrosj.
Fixes #44079.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 20:44:21 +00:00
iandunn
fdd5b8dacd Privacy: Rename exports folder to avoid deleting other files.
Previously, personal data exports were stored in `wp-content/uploads/exports`, which is generic enough that it's likely there are existing folders with that name, either created by plugins or manually by administrators. If that folder were reused by Core, then `wp_privacy_delete_old_export_files()` would delete all of the existing files inside it, which is almost certainly not what the site owner wants or expects.

To avoid that, the folder is being renamed to include a specific reference to Core, and a more verbose description of its purpose. With those factored in, it's very unlikely that there will be any conflicts with existing folders.

The `wp_privacy_exports_dir()` and `wp_privacy_exports_url()` functions were introduced to provide a canonical source for the location, and the `wp_privacy_exports_dir` and `wp_privacy_exports_url` filters were introduced to allow plugins to customize it.

Props johnjamesjacoby, allendav.
Fixes #44091.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 20:22:20 +00:00
Andrew Ozz
534f732104 Privacy: use the more compatible word-break: break-all;, see [43278].
See #44092.
Built from https://develop.svn.wordpress.org/trunk@43282


git-svn-id: http://core.svn.wordpress.org/trunk@43111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 20:07:22 +00:00
Andrew Ozz
11ea5ebe0a Privacy: fix styling of the Privacy Settings buttons on mobile/small screens.
Props ianbelanger, azaozz.
Fixes #44093.
Built from https://develop.svn.wordpress.org/trunk@43279


git-svn-id: http://core.svn.wordpress.org/trunk@43108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 19:27:22 +00:00
Andrew Ozz
548f73cc7c Privacy: fix styling of the "next steps" buttons on the Export/Erase tools screens when text is long.
Props audrasjb, ianbelanger.
Fixes #44092.
Built from https://develop.svn.wordpress.org/trunk@43278


git-svn-id: http://core.svn.wordpress.org/trunk@43107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 18:59:21 +00:00
Felix Arntz
dac5651f23 Widgets: Allow basic inline tags in wp_sidebar_description().
The customizer has allowed HTML in sidebar descriptions since adding support for sidebars. This change ensures that basic HTML is also allowed for them in the widgets admin screen.

Fixes #42608.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 16:55:21 +00:00
iandunn
3aaef96ff8 Privacy: Reposition log in policy link to avoid overlapping elements.
Previously, the link used absolute positioning, in order to stick it at the bottom of the page. That was done in order to create visual separation between it and the "action" links, like "Lost Your Password?"

The absolute positioning can cause conflicts in some situations, though. For example, if extra text or error notices are added above the form, then the login link would be positioned on top of other elements.

Switching to relative positioning with extra margins avoids those issues, while maintaining the visual separation between the "action" links and the privacy policy link.

Props imath, melchoyce, desrosj, xkon, iandunn.
Fixes #44046.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43103 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-15 16:27:24 +00:00
Andrew Ozz
8c06c2c662 Privacy: only remove the "Suggested text has changed" bubble when an admin visits the Privacy Policy Guide screen.
Fixes #44063.
Built from https://develop.svn.wordpress.org/trunk@43269


git-svn-id: http://core.svn.wordpress.org/trunk@43098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 17:52:21 +00:00
Andrew Ozz
2e9b08b3a2 Privacy: add wp_page_for_privacy_policy to populate_options().
Props ocean90.
Fixes #44076.
Built from https://develop.svn.wordpress.org/trunk@43267


git-svn-id: http://core.svn.wordpress.org/trunk@43096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 17:00:22 +00:00
Andrew Ozz
242e6eea46 Privacy: fix markup for the table of contents on privacy policy guide screen.
Props ocean90, azaozz.
Fixes #44056.
Built from https://develop.svn.wordpress.org/trunk@43265


git-svn-id: http://core.svn.wordpress.org/trunk@43094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 16:46:23 +00:00
Andrew Ozz
b5564c8646 Privacy: fix the "Privacy Policy Guide updated" message and add a link to the guide.
Props birgire, azaozz.
Fixes #44057.
Built from https://develop.svn.wordpress.org/trunk@43263


git-svn-id: http://core.svn.wordpress.org/trunk@43092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 16:21:21 +00:00
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
John Blackbourn
810cbb537b Docs: Add missing HTTP methods to the list of those supported.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@43087 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 15:23:21 +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
e765930982 Privacy: fix Export and Erase Personal Data list-tables on small screens.
Props ianbelanger, subrataemfluence, desrosj.
Fixes #44026.
Built from https://develop.svn.wordpress.org/trunk@43251


git-svn-id: http://core.svn.wordpress.org/trunk@43080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 09:21:21 +00:00
Andrew Ozz
cb084eefd8 Privacy: define $title and $parent_file in privacy.php. Fixes showing the proper document title.
Props ocean90.
Fixes #44064.
Built from https://develop.svn.wordpress.org/trunk@43250


git-svn-id: http://core.svn.wordpress.org/trunk@43079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-14 08:29:22 +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
Sergey Biryukov
9a390ea6bd Docs: Correct type for WP_Taxonomy::$cap.
Props dlh.
Fixes #44061.
Built from https://develop.svn.wordpress.org/trunk@43247


git-svn-id: http://core.svn.wordpress.org/trunk@43076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-13 10:31:22 +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
iandunn
fc800115a7 Privacy: Escape comment URLs in personal export file to prevent XSS.
There doesn't appear to be any way for an attacker to introduce malicious input into the URL, unless a plugin is filtering the URL to add it, but it's better to be safe than sorry.

Props birgire.
Fixes #44054.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-12 15:56:21 +00:00
Weston Ruter
89708c5cec Customize: Hide expansion arrows in Customizer's available widgets list.
Fixes regression introduced by [42794].

Props dlh.
See #40677.
Fixes #43983.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-11 17:35:23 +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
b7ff8e4f9f Privacy: On Privacy Settings screen, check if any pages exist before displaying the page selector.
Props abdullahramzan, desrosj, melchoyce.
Fixes #43940.
Built from https://develop.svn.wordpress.org/trunk@43238


git-svn-id: http://core.svn.wordpress.org/trunk@43067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 21:39:22 +00:00
iandunn
b26ab11343 Privacy: Expose erasure notification recipient to filter callbacks.
The previous `user_email` value was redundant, because it always matched `$request_data->email`. That value might be different from where the message is sent, though, if the `user_erasure_fulfillment_email_to` filter is used. If they are different, then callbacks for the `user_confirmed_action_email_content` filter may want to distinguish between the email address of the user making the request, and the email address that the confirmation notification is being sent to.

Props desrosj, iandunn.
See #43973.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 21:20:22 +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
ae2b929294 Privacy: Update request confirmation notice text for clarity.
Props desrosj, melchoyce, garrett-eclipse.
Fixes #43970.
Built from https://develop.svn.wordpress.org/trunk@43232


git-svn-id: http://core.svn.wordpress.org/trunk@43061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 20:53:21 +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
Sergey Biryukov
5028eb01fd General: Skip test_is_countable_ResourceBundle() on PHP 5.3 and below.
`ResourceBundle` is only countable in PHP 5.4+, which can be considered an acceptable edge case for WordPress core purposes.

Props jrf, ayeshrajans.
Fixes #43583.
Built from https://develop.svn.wordpress.org/trunk@43226


git-svn-id: http://core.svn.wordpress.org/trunk@43055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 20:16:21 +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
7b5f40133a TinyMCE: switch off concatenation when a custom TinyMCE theme is used. Prevents conflict with the default theme as it loads first.
Props programmin, azaozz.
Fixes #43969.
Built from https://develop.svn.wordpress.org/trunk@43222


git-svn-id: http://core.svn.wordpress.org/trunk@43051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 19:50:21 +00:00
Sergey Biryukov
29d5e980cc General: In the is_countable() polyfill, if the provided object implements SimpleXMLElement or ResourceBundle, consider it countable.
Props ayeshrajans, jrf, desrosj.
Fixes #43583.
Built from https://develop.svn.wordpress.org/trunk@43220


git-svn-id: http://core.svn.wordpress.org/trunk@43049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 17:58:22 +00:00
Sergey Biryukov
f766c46904 Privacy: Tweak Privacy Policy page intro text for clarity.
Props macbookandrew, allendav.
See #43933.
Built from https://develop.svn.wordpress.org/trunk@43218


git-svn-id: http://core.svn.wordpress.org/trunk@43047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 16:12:21 +00:00
Andrew Ozz
12d7f2be78 Privacy: fix styling on personal data tables.
Props melchoyce, allendav.
Fixes #43909.
Built from https://develop.svn.wordpress.org/trunk@43216


git-svn-id: http://core.svn.wordpress.org/trunk@43045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 16:02: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
06fd54dab6 Privacy: Notify admin via email when a request is confirmed.
Previously the admin didn't have any way to know if a pending request was ready to be processed, aside from manually checking the Export/Erase pages. Sending them an email is a much more convenient option.

Props garrett-eclipse, desrosj, iandunn.
See #43967.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-10 05:00:20 +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
John Blackbourn
bd9b25afbb Upgrade/Install: Correctly internationalise error messages during config setup.
Fixes #43997

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


git-svn-id: http://core.svn.wordpress.org/trunk@43034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-09 22:52: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