38077 Commits

Author SHA1 Message Date
Sergey Biryukov
ed6fe25890 Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour.

Merges [43525] to the 4.9 branch.
See #44373.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43526 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 12:52:29 +00:00
Sergey Biryukov
f1e98d9609 Comments: Ensure that themes overriding default comment_form() fields still display the cookies consent checkbox.
The `comment_form_default_fields` filter can be used to remove the checkbox.

Props pross, SergeyBiryukov.
Merges [43518] to the 4.9 branch.
Fixes #44126.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43524 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 12:42:33 +00:00
Gary Pendergast
3e2ca8c151 Dashboard: Improve "Try Gutenberg" subheading appearance for long headings.
When translated, the callout subheadings can wrap onto a new line, which caused them to overlap the paragraph text.

Props earnjam, fierevere.
Fixes #44611.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43523 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 03:04:03 +00:00
Gary Pendergast
34376b5df7 Dashboard: Make some of the "Try Gutenberg" links translatable.
Some of the links in the "Try Gutenberg" callout go to wordpress.org, so would potentially be better served by localised site.

Props dimadin.
See #41316.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43522 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 02:51:28 +00:00
Aaron D. Campbell
a98c41139e Post WordPress 4.9.8 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43516 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:47:22 +00:00
Aaron D. Campbell
7f7280eebc WordPress 4.9.8 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43515 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:24:04 +00:00
Sergey Biryukov
54842bc4e3 Privacy: Improve grammar on Privacy Settings screen.
Props ianbelanger, garrett-eclipse.
Merges [43513] to the 4.9 branch.
Fixes #44612.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43514 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:15:06 +00:00
K. Adam White
343e8d4ea3 REST API: Support meta registration for specific object subtypes.
Introduce an object_subtype argument to the args array for register_meta() which can be used to limit meta registration to a single subtype (e.g. a custom post type or taxonomy, vs all posts or taxonomies).

Introduce register_post_meta() and register_term_meta() wrapper methods for register_meta to provide a convenient interface for the common case of registering meta for a specific taxonomy or post type. These methods work the way plugin developers have often expected register_meta to function, and should be used in place of direct register_meta where possible.

Props flixos90, tharsheblows, spacedmonkey.

Merges [43378] to the 4.9 branch.
Fixes #38323.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43510 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 18:48:52 +00:00
Sergey Biryukov
6426368f14 Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.
Props XpertOne, idea15, garrett-eclipse.
Merges [43508] to the 4.9 branch.
Fixes #44130.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43509 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 12:16:47 +00:00
Sergey Biryukov
9c35dcd477 Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link().
Props desrosj, birgire, ianbelanger, Ov3rfly.
Merges [43506] to the 4.9 branch.
Fixes #44192.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43507 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:51:06 +00:00
Sergey Biryukov
8e0b78fadf I18N: Update list of continents and cities for the timezone selection.
Props soulseekah, dyrer.
Merges [43504] to the 4.9 branch.
Fixes #44574.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43505 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:26:17 +00:00
Gary Pendergast
e86f3b6dd1 Dashboard: Introduce the "Try Gutenberg" callout.
To encourage folks to prepare for Gutenberg, this new Dashboard box allows site users to easily install and try the Gutenberg plugin now, or to install the Classic Editor plugin before WordPress 5.0 is released.

Props pento, melchoyce, joen, karmatosed, joemcgill, SergeyBiryukov, jorbin, bph, Clorith, afercia, chanthaboune, chrislema, kjellr, matveb, michelleweber.
Fixes #41316.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43502 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 06:41:07 +00:00
Sergey Biryukov
2080421de2 Privacy: Add unit tests for _wp_privacy_send_request_confirmation_notification(), introduced in [43211].
Props birgire, desrosj, garrett-eclipse.
Merges [43499] to the 4.9 branch.
Fixes #43967.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43500 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 23:02:14 +00:00
Aaron D. Campbell
1d5520c9de Post WordPress 4.9.8 Beta 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43498 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 19:40:06 +00:00
Aaron D. Campbell
75bbe64fa0 WordPress 4.9.8 Beta 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43497 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 19:27:04 +00:00
Sergey Biryukov
e2278c8588 Privacy: Mark Privacy Policy page as such in the Pages list table.
Props desrosj, subrataemfluence, ianbelanger, danieltj.
Merges [43495] to the 4.9 branch.
Fixes #44006.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43496 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:46:25 +00:00
Sergey Biryukov
5b25e87093 Twenty Seventeen: Correct list item style for nested unordered lists.
Props macbookandrew, audrasjb.
Merges [43493] to the 4.9 branch.
Fixes #44109.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43494 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:36:17 +00:00
Sergey Biryukov
9f2e375a48 Taxonomy: Ensure that invalid term objects are discarded in WP_Term_Query.
The `get_term()` mapping may result in term objects that are `null` or
`WP_Error` when plugins use `get_term` or a related filter. Since `null`
and error objects are not valid results for a term query, we discard
them.

Props GM_Alex.
Merges [43049] and [43491] to the 4.9 branch.
Fixes #42691.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43492 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:27:12 +00:00
Sergey Biryukov
6a3696fea2 REST API: Fix some incorrect @since tags.
[43437] included some new methods, which were incorrectly tagged as being `@since 4.9.7`. This updates them to `4.9.8`.

Props danielbachhuber.
Merges [43463] to the 4.9 branch.
Fixes #44287.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43490 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:15:03 +00:00
Sergey Biryukov
26d12c9753 REST API: Attachments controller should respect upload limits.
When the REST API is in use on WordPress multisite, the `WP_REST_Attachments_Controller` should respect the "Max upload file size" and "Site upload space" site options.

Props flixos90, danielbachhuber.
Merges [43462] to the 4.9 branch.
Fixes #43751.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43489 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:11:48 +00:00
Sergey Biryukov
0ce962433c Privacy: Add $request to $email_data to make it available to all filters.
Props desrosj.
Merges [43477] to the 4.9 branch.
Fixes #44379.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43488 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:09:31 +00:00
Sergey Biryukov
8e1d7cdcba Privacy: Enable pagination screen options for privacy requests list tables.
Props birgire, pbiron.
Merges [43486] to the 4.9 branch.
Fixes #44025.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43487 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:07:45 +00:00
Sergey Biryukov
f08f3cd027 Privacy: Remove some unnecessary code comments.
[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Merges [43465] to the 4.9 branch.
Fixes #44590.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43485 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 15:24:57 +00:00
Sergey Biryukov
2e3360dc02 Streams: Return early from wp_is_stream() for paths that aren't streams.
Some versions of PHP appear to have a memory leak that is occasionally triggered by calling `stream_get_wrappers()`. In order to avoid calling this, we can return early from `wp_is_stream()` when `$path` doesn't contain `://`.

Props pbiron, JPry, dontstealmyfish.
Merges [43466] to the 4.9 branch.
Fixes #44532.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43484 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 15:19:26 +00:00
Sergey Biryukov
ad54dd647b Streams: When checking in wp_is_stream() escape the stream wrapper names for PCRE to avoid PHP warnings when invalid stream wrappers are registered.
Props dd32.
Merges [42432] to the 4.9 branch.
Fixes #43054.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43483 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 15:18:12 +00:00
Sergey Biryukov
d9da76d19f Editor: Use apply_filters_deprecated() for some deprecated filters.
The `htmledit_pre` and `richedit_pre` filters have been deprecated since 4.3.0, since before `apply_filters_deprecated()` existed. They're now correctly run using `apply_filters_deprecated()`.

Props sebastienthivinfocom, lbenicio, ianbelanger.
Merges [43464] to the 4.9 branch.
Fixes #44341.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43482 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 15:04:03 +00:00
Andrew Ozz
f2783d5e91 Customize: Do not attempt to count uncountable value.
Props dlh.
Merges [43480] to the 4.9 branch.
Fixes #44104.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43481 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:39:59 +00:00
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