38022 Commits

Author SHA1 Message Date
Sergey Biryukov
b58ca547e5 Privacy: Make sure wp_add_privacy_policy_content() does not cause a fatal error by unintentionally flushing rewrite rules outside of the admin context.
Add a `_doing_it_wrong()` message describing the correct usage of the function.

Props kraftbj, azaozz, SergeyBiryukov, YuriV.
Merges [43361], [43362], [43363] to the 4.9 branch.
Fixes #44142.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43364 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:11:57 +00:00
Sergey Biryukov
95f91dc38c Privacy: Only link to menus panel in Customizer if selected privacy page can be accessed there.
Props dlh.
Merges [43343] to the 4.9 branch.
Fixes #44117.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43358 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:49:20 +00:00
Sergey Biryukov
c4b31e3816 Community Events Dashboard: Always show a WordCamp if one is coming up.
WordCamps are celebrations of the local WordPress Community and once a local one is scheduled, people in that community should know it is coming. This adjusts the WordPress Events in the dashboard widgets to always display a WordCamp, even if there are multiple Meetups happening first.

Props iandunn, metalandcoffee, warmlaundry, alejandroxlopez, jorbin.
Merges [42726], [42728], and [43356] to the 4.9 branch.
Fixes #41112.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43357 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:42:16 +00:00
Sergey Biryukov
94acdb2e86 Privacy: Remove unnecessary This email has been sent to ###EMAIL### from privacy emails.
The line was copied from the emails that get sent when an email address changes, without considering if it made sense in the new context.

Props iandunn, ianbelanger, desrosj.
Merges [43353] to the 4.9 branch.
Fixes #44030.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43354 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:26:06 +00:00
Sergey Biryukov
5cece53eb7 Privacy: Fix typo in default privacy policy text.
Props garetharnold, abdullahramzan.
Merges [43350] to the 4.9 branch.
Fixes #44166.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43351 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 10:08:10 +00:00
Sergey Biryukov
ca1539953a Posts, Post Types: Clear post password cookie when logging out.
Props skoldin, subrataemfluence, ianbelanger, johnbillion.
Merges [43317] and [43318] to the 4.9 branch.
Fixes #44089.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43349 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 09:32:43 +00:00
Sergey Biryukov
9f1f4ce428 Users: In wp_validate_user_request_key(), properly return the WP_Error object in case the confirmation email has expired.
Props itowhid06.
Merges [43331] to the 4.9 branch.
Fixes #44298.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43342 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-13 02:01:47 +00:00
John Blackbourn
e86a6dfdb5 Build/Test Tools: Allow the unit test framework to be used without the data directory in place.
Fixes #43982

Merges [43315] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43316 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-25 22:47:39 +00:00
Boone Gorges
f27af570cd Taxonomy: Improve cache handling when querying for terms using all_with_object_id.
When a term query using `fields=all_with_object_id` hits the cache, the
cached `stdClass` objects must be converted to `WP_Term` objects. This
was overlooked when `WP_Term_Query` was refactored to support object
queries in [38667].

Merges [43313] to the 4.9 branch.

Props dlh.
Fixes #44221.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43314 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-25 01:25:55 +00:00
Sergey Biryukov
b309e70893 Docs: Document the cookies default comment field added in [42772].
Props desrosj, chetan200891.
Merges [43304] to the 4.9 branch.
See #44125.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43306 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 13:16:37 +00:00
Sergey Biryukov
53f9a24450 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.
Merges [43303] to the 4.9 branch.
See #44125.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43305 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 13:15:21 +00:00
Sergey Biryukov
eae65cf531 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.

Props flixos90.
Merges [43275] to the 4.9 branch.
Fixes #42608.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43302 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 12:42:49 +00:00
Sergey Biryukov
2e3e405fdb 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.
Merges [43290] to the 4.9 branch.
Fixes #44115.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43301 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 12:39:54 +00:00
Sergey Biryukov
e563e309e2 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.
Merges [43299] to the 4.9 branch.
Fixes #44158.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43300 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-21 12:01:40 +00:00
Dominik Schilling (ocean90)
6ed010dc57 Branch 4.9 is now 4.9.7-alpha.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43298 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-17 19:56:28 +00:00
Ian Dunn
7781d02f0f Bump 4.9 branch to version 4.9.5.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43296 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-17 18:55:55 +00:00
Ian Dunn
08bf39bf9b 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.
Merges [43293] to the 4.9 branch.
Fixes #43915.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43295 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-17 18:26:20 +00:00
Ian Dunn
91d717933a Bundled Themes: Add link to privacy policy page in footer.
If a privacy policy has been set, then a link to it will automatically be shown in the footer.

The element containing the "Proudly powered by WordPress" link was chosen for the new policy link, in order to minimize visual conflicts with custom CSS that was written before the new link existed. Unfortunately, some minor conflicts are expected and unavoidable. Adding this link is required as part of GDPR compliance, and the benefits outweigh the downsides. 

To further mitigate the conflicts, a new imprint class was added to the "Proudly powered..." link, in order to facilitate targeting each link invididually with custom styles.

This was accidentally not backported to the `4.9` branch before the beta/RC phase, but there was a consensus that it is safe to do that this late in the release cycle. 
See https://wordpress.slack.com/archives/C02RQBWTW/p1526577643000132.
See https://wordpress.slack.com/archives/C02RQBWTW/p1526580781000240.

Props xkon, laurelfulford, birgire, azaozz, iandunn.
Merges [43051] to the 4.9 branch.
See #43715.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43294 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-17 18:20:44 +00:00
Ian Dunn
d8fcefdd25 Post WordPress 4.9.6 RC 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43289 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 21:28:17 +00:00
Ian Dunn
0e87a80ff3 WordPress 4.9.6 RC 2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43288 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 21:19:53 +00:00
Ian Dunn
b55ffd3cfa 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.
Merges [43286] to the 4.9 branch.
Fixes #44079.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43287 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 20:58:05 +00:00
Andrew Ozz
2750118c45 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.
Merges [43284] to the 4.9 branch.
Fixes #44091.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43285 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 20:32:01 +00:00
Andrew Ozz
5a35e11560 Privacy: use the more compatible word-break: break-all;, see [43278].
Merges [43282] to the 4.9 branch.
See #44092.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43283 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 20:08:29 +00:00
Andrew Ozz
621b386a3f Privacy: fix styling of the "next steps" buttons on the Export/Erase tools screens when text is long.
Props audrasjb, ianbelanger.
Merges [43278] to the 4.9 branch.
Fixes #44092.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43281 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 19:44:47 +00:00
Andrew Ozz
dcd3b3b088 Privacy: fix styling of the Privacy Settings buttons on mobile/small screens.
Props ianbelanger, azaozz.
Merges [43279] to the 4.9 branch.
Fixes #44093.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43280 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 19:42:20 +00:00
Ian Dunn
d3ec75932b Privacy: require manage_privacy_options capability for showing WP_Privacy_Policy_Content::notice().
Props ocean90.
Merges [43248] to the 4.9 branch.
Fixes #44055.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43277 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 18:03:21 +00:00
Andrew Ozz
b9f0dbc332 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.
Merges [43274] to the 4.9 branch.
Fixes #44046.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43276 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 16:54:55 +00:00
Sergey Biryukov
7e235713cd Privacy: only remove the "Suggested text has changed" bubble when an admin visits the Privacy Policy Guide screen.
Props azaozz.
Merges [43269] to the 4.9 branch.
Fixes #44063.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43273 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 15:51:07 +00:00
Sergey Biryukov
5755e77efb Privacy: automatically create a Privacy Policy page when installing WordPress.
Props fclaussen, azaozz.
Merges [42981], [42982], [43243] to the 4.9 branch.
Fixes #43491.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43272 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 15:29:27 +00:00
Sergey Biryukov
06b7524c79 Privacy: fix Export and Erase Personal Data list-tables on small screens.
Props ianbelanger, subrataemfluence, desrosj.
Merges [43251] to the 4.9 branch.
Fixes #44026.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43271 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 15:09:14 +00:00
Andrew Ozz
7dcbacc723 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.
Merges [43245] to the 4.9 branch.
Fixes #44054.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43270 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-15 14:07:32 +00:00
Andrew Ozz
c5387f14f6 Privacy: add wp_page_for_privacy_policy to populate_options().
Props ocean90.
Merges [43267] to the 4.9 branch.
Fixes #44076.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43268 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 17:01:02 +00:00
Andrew Ozz
eb02a647b8 Privacy: fix markup for the table of contents on privacy policy guide screen.
Props ocean90, azaozz.
Merges [43265] to the 4.9 branch.
Fixes #44056.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43266 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:47:37 +00:00
Andrew Ozz
13659fd67c Privacy: fix the "Privacy Policy Guide updated" message and add a link to the guide.
Props birgire, azaozz.
Merges [43263] to the 4.9 branch.
Fixes #44057.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43264 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:24:08 +00:00
Dominik Schilling (ocean90)
86e9864482 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.

Merge of [43260] to the 4.9 branch.

See #44065.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43262 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 16:07:12 +00:00
Dominik Schilling (ocean90)
a7c7e72a53 Privacy: Don't show privacy feature pointer to new users.
Merge of [43259] to the 4.9 branch.

See #44062.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43260 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 15:52:24 +00:00
Andrew Ozz
ef181c44e3 Privacy: improve inline documentation.
Props desrosj.
Merges [43256] to the 4.9 branch.
Fixes #44075.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43257 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 15:11:58 +00:00
Sergey Biryukov
0b266d74dc Privacy: exclude the wrapper from the default policy content.
Props azaozz.
Merges [43242] to the 4.9 branch.
Fixes #44048.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43255 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 14:06:28 +00:00
Sergey Biryukov
2bf0e98f60 Privacy: fix two typos in WP_Privacy_Policy_Content::get_default_content().
Props dlh.
Merges [43249] to the 4.9 branch.
Fixes #44050.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43254 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 14:02:36 +00:00
Sergey Biryukov
daf584fb2c 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.
Merges [43246] to the 4.9 branch.
Fixes #44045.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43253 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 14:00:01 +00:00
Sergey Biryukov
8fa3eaed8a Privacy: define $title and $parent_file in privacy.php. Fixes showing the proper document title.
Props ocean90.
Merges [43250] to the 4.9 branch.
Fixes #44064.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43252 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-14 13:53:25 +00:00
Ian Dunn
921e31d776 Post WordPress 4.9.6 RC 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43241 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 22:33:51 +00:00
Ian Dunn
958cc9962a WordPress 4.9.6 RC 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43240 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 22:17:21 +00:00
Sergey Biryukov
8a6f1d8078 Privacy: On Privacy Settings screen, check if any pages exist before displaying the page selector.
Props abdullahramzan, desrosj, melchoyce.
Merges [43238] to the 4.9 branch.
Fixes #43940.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43239 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:40:28 +00:00
Sergey Biryukov
1995d39556 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.
Merges [43236] to the 4.9 branch.
See #43973.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43237 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:21:53 +00:00
Sergey Biryukov
d698ec7241 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.
Merges [43234] to the 4.9 branch.
Fixes #43908.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43235 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:12:21 +00:00
Sergey Biryukov
d61e8ba0ed Privacy: Update request confirmation notice text for clarity.
Props desrosj, melchoyce, garrett-eclipse.
Merges [43232] to the 4.9 branch.
Fixes #43970.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43233 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 21:04:21 +00:00
Sergey Biryukov
0471434401 Privacy: Send an email notification to the user once their personal data erasure request is fulfilled.
Props desrosj, allendav, garrett-eclipse.
Merges [43230] to the 4.9 branch.
Fixes #43973.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43231 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:43:39 +00:00
Sergey Biryukov
32df92e14f Privacy: Avoid a PHP notice in wp_ajax_wp_privacy_erase_personal_data(), make sure $eraser_key is always defined.
Props allendav.
Merges [43228] to the 4.9 branch.
Fixes #44040.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43229 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:24:41 +00:00
Sergey Biryukov
b6f00e0c4c 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.
Merges [43226] to the 4.9 branch.
Fixes #43583.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43227 602fd350-edb4-49c9-b593-d223f7449a82
2018-05-10 20:17:00 +00:00