38150 Commits

Author SHA1 Message Date
Sergey Biryukov
0d2dcb5df2 Privacy: Rename username_or_email_to_export POST variable on Erase Personal Data screen to a more generic username_or_email_for_privacy_request.
Props ianbelanger, allendav.
Merges [43478] to the 4.9 branch.
Fixes #44181.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43479 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:17:42 +00:00
Andrew Ozz
e9b479219b Privacy: Add filter for the subject of the erasure complete notification emails.
Props desrosj.
Merges [43475] to the 4.9 branch.
Fixes #44265.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43476 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 13:43:55 +00:00
Andrew Ozz
0b5a5a2281 TinyMCE: do not force-load external plugins, not needed any more and may cause issues.
Merges [43337] to the 4.9 branch.
Fixes #44330.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43474 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 10:08:33 +00:00
Andrew Ozz
98972bf358 Privacy: Fix tests after [43467].
Merges [43471] to the 4.9. branch.
See #44141.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43473 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 10:06:12 +00:00
Andrew Ozz
95cf14f832 TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
Merges [43447] to the 4.9 branch.
Fixes #44134.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43472 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 10:03:44 +00:00
Andrew Ozz
e0e280d925 Privacy: Add a setting to disable comment cookie consent.
Merges [43469] to the 4.9 branch.
Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43470 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:29:08 +00:00
Andrew Ozz
0f75de12c7 Privacy: Don't replace comment author URL and email with anything.
Props TZ-Media, desrosj, birgire.
Merges [43467] to the 4.9 branch.
Fixes #44141.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43468 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:03:33 +00:00
Sergey Biryukov
080c66d653 Posts, Post Types: Add a new add_inline_data action which allows extra fields to be added to the inline editing fields.
Props mensmaximus, NathanAtmoz.
Merges [42676] and [43460] to the 4.9 branch.
Fixes #36085.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43461 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 15:33:57 +00:00
Sergey Biryukov
8123e2187a Privacy: Use consistent values for the site name and URL used in notification emails.
The functions `send_confirmation_on_profile_email()`, `_wp_privacy_send_request_confirmation_notification()`, `_wp_privacy_send_erasure_fulfillment_notification()`, and `wp_send_user_request()` all include a title and URL indicating the current site. However, so far they have dealt with those values inconsistently, sometimes using the site values, other times using the network values if in a multisite. This changeset ensures that only the current site is taken into account in all cases and that special characters in the site name are consistently decoded.

Props subrataemfluence, desrosj.
Merges [43388], [43390], and [43435] to the 4.9 branch.
Fixes #44396.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43459 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 14:23:26 +00:00
Sergey Biryukov
b7f86906c7 Login and Registration: Set a better default value for $wp_error parameter in login_header().
To prevent someone from passing a string (which would not be added to a new `WP_Error` instance), check for `is_wp_error()` explicitly.

Props desrosj, chetan200891, spyderbytes, lbenicio, sebastien@thivinfo.com, abdullahramzan.
Merges [43457] to the 4.9 branch.
Fixes #44052.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43458 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 14:13:11 +00:00
Sergey Biryukov
358e9e08f1 Privacy: use wp_login_url() for the link in the user confirmation email.
Props desrosj, usmankhalid.
Merges [43379] to the 4.9 branch.
Fixes #44353.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43456 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:53:43 +00:00
Sergey Biryukov
9b7b853da8 Privacy: append (Draft) to draft page titles in the page drop-down on the Privacy Settings screen.
Props allendav, desrosj.
Merges [43376] and [43454] to the 4.9 branch.
Fixes #44100.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43455 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:51:08 +00:00
Sergey Biryukov
a54f180b6f Privacy: on the Privacy Settings screen change view to preview when a draft page is selected for the privacy policy.
Props garrett-eclipse, desrosj.
Merges [43374] to the 4.9 branch.
Fixes #44131.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43453 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:29:11 +00:00
Sergey Biryukov
bff94e95e5 Privacy: Change @since entry for user_request_confirmed_email_subject filter added in [43373] to 4.9.8.
Merges [43451] to the 4.9 branch.
Fixes #44382.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43452 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:23:44 +00:00
Sergey Biryukov
17ad493240 Privacy: add user request type to the admin notification email subject.
Merges [43375] to the 4.9 branch.
Props birgire, desrosj.
Fixes #44099.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43450 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 12:08:11 +00:00
Sergey Biryukov
92ad9c0a3e Privacy: do not show the comment cookies opt-in checkbox (on the front-end comments form) when comment cookies are disabled.
Props felipeelia, johnbillion.
Merges [43370] to the 4.9 branch.
Fixes #44342.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43449 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 12:06:02 +00:00
Sergey Biryukov
f691c3100b Privacy: Silence is golden and invisible.
"Be more discrete." declared matt in [3155], and since then, "Silence is Golden" has been the calling card of placeholder index files. Historically, these have been php files, but [43012] changed that and added index.html files for privacy export generated folders.

The php silence files produce no visible content. This adds consistency with these new html files in that there will be no visible content. Silence will fall when the question is asked.

Merges [43446] to the 4.9 branch.
Fixes #44195.
Props audrasjb, rafsuntaskin, Ov3rfly, johnbillion, pento

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43448 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 12:01:07 +00:00
Gary Pendergast
96c83f4400 REST API: Filter responses based on the _fields parameter, before data is processed.
Historically, the REST API would generate the entire response object, including running expensive filters, then it would apply the `_fields` parameter, discarding the fields that weren't specificed.

This change causes `_fields` to be applied earlier, so that only requested fields are processed.

Merges [43087] to the 4.9 branch.

Props danielbachhuber.
See #43874.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43445 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 06:50:51 +00:00
Gary Pendergast
f364b2fa5c Emoji: Update Twemoji to version 11.0.
🦹

Backport of [43377] to the 4.9 branch.

Props kraftbj,
Fixes #44339.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43444 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 06:36:23 +00:00
Gary Pendergast
b16c8874f2 REST API: Tweak permission checks for taxonomy and term endpoints
To match behaviour in the Classic Editor, we need to slightly loosen permissions on taxonomy and term endpoints. This allows users to create terms to assign to a post that they're editing.

Merges [43440] to the 4.9 branch.

Props danielbachhuber.
Fixes #44096.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43443 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 06:28:29 +00:00
Gary Pendergast
c8d1e3f6b8 REST API: Expose revision count and last revision ID on Post response
So that REST API clients can show appropriate UI for a post's revisions, it needs to know how many revisions the post has, and what the latest revision ID is.

Merge of [43439] and [43441] to the 4.9 branch.

Props kadamwhite, danielbachhuber, birgire, TimothyBlynJacobs, pento.
Fixes #44321.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43442 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 06:13:27 +00:00
Gary Pendergast
f02581f667 REST API: Declare user capabilities using JSON Hyper Schema's "targetSchema".
There are a variety of operations a WordPress user can only perform if they have the correct capabilities. A REST API client should only display UI for one of these operations if the WordPress user can perform the operation.

Rather than requiring REST API clients to calculate whether to display UI based on potentially complicated combinations of user capabilities, `targetSchema` allows us to expose a single flag to show whether the corresponding UI should be displayed.

This change also includes flags on post objects for the following actions:

- `action-publish`: The current user can publish this post.
- `action-sticky`: The current user can make this post sticky, and the post type supports sticking.
- `action-assign-author': The current user can change the author on this post.
- `action-assign-{$taxonomy}`: The current user can assign terms from the "$taxonomy" taxonomy to this post.
- `action-create-{$taxonomy}`: The current user can create terms int the "$taxonomy" taxonomy.

Merges [43437] to the 4.9 branch.

Props TimothyBlynJacobs, danielbachhuber.
Fixes #44287.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43438 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-11 09:20:10 +00:00
Aaron D. Campbell
169f2a432d Post 4.9.7 version bump for 4.9 branch
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43433 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 18:13:53 +00:00
Aaron D. Campbell
8be3954728 Bump 4.9 branch to version 4.9.7
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43407 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 16:05:00 +00:00
John Blackbourn
f5f5f2633e Media: Limit thumbnail file deletions to the same directory as the original file.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43393 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 14:44:35 +00:00
Andrew Ozz
5ab9fcc659 Privacy: add esc_html to assertion in test_wp_comments_personal_data_exporter.
Props mermel, 1naveengiri.
Merges [43371] to the 4.9 branch.
Fixes #44113.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43372 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-18 16:12:08 +00:00
John Blackbourn
204ff88422 Security: Harden the random aspect of the hash used for user profile and admin email address changes.
Props BjornW

Fixes #43771

Merges [43367] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43368 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 14:12:55 +00:00
John Blackbourn
0b5888c59b Options, Meta APIs: Use the correct escaping function when outputting the meta box context.
Props khaihong, abdullahramzan, leanderiversen, aryamaaru, lbenicio, palmiak

Fixes #44274

Merges [43365] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43366 602fd350-edb4-49c9-b593-d223f7449a82
2018-06-16 13:54:50 +00:00
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