Commit Graph

38631 Commits

Author SHA1 Message Date
Sergey Biryukov
0f7e947546 REST API: Ensure attachments created with WP_REST_Attachments_Controller::create_item() on Windows have a relative path.
Props ocean90, SergeyBiryukov, redcastor.
Fixes #40861.

git-svn-id: https://develop.svn.wordpress.org/trunk@43529 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 16:51:09 +00:00
Sergey Biryukov
6c32fcd011 I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Fixes #44139.

git-svn-id: https://develop.svn.wordpress.org/trunk@43527 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 15:03:19 +00:00
Sergey Biryukov
335b69cedc Privacy: Remove the setting to enable comment cookies consent added in [43469].
This needs some more work to ensure expected behaviour.

See #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43525 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 12:50:55 +00:00
K. Adam White
3aba622692 Docs: Add $object_subtype param documentation for sanitize_meta().
Props timothyblynjacobs.

See #38323.


git-svn-id: https://develop.svn.wordpress.org/trunk@43521 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-23 17:13:40 +00:00
K. Adam White
9fd092fb71 Docs: Update @since version to 4.9.8 for meta registration subtype handling.
This feature has been backported to 4.9.8 so 5.0.0 is inaccurate.

See #38323.


git-svn-id: https://develop.svn.wordpress.org/trunk@43520 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-23 17:01:02 +00:00
John Blackbourn
796bac8645 Docs: Correct the parameter type for WP_REST_Post_Types_Controller::prepare_item_for_response().
Props subrataemfluence

Fixes #44437


git-svn-id: https://develop.svn.wordpress.org/trunk@43519 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-22 12:25:48 +00:00
Sergey Biryukov
8a0aac2ccb 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.
Fixes #44126.

git-svn-id: https://develop.svn.wordpress.org/trunk@43518 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-20 00:37:40 +00:00
obenland
9d4b0ec88f Toolbar: Fail gracefully when adding events to non-existent elements
Avoids a type error when `obj` is not set.

Fixes #44526.


git-svn-id: https://develop.svn.wordpress.org/trunk@43517 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 21:59:23 +00:00
Sergey Biryukov
e7d9ee5051 Privacy: Improve grammar on Privacy Settings screen.
Props ianbelanger, garrett-eclipse.
Fixes #44612.

git-svn-id: https://develop.svn.wordpress.org/trunk@43513 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 20:13:29 +00:00
Sergey Biryukov
2075b3d921 Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
See #44613.

git-svn-id: https://develop.svn.wordpress.org/trunk@43512 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 19:52:41 +00:00
Sergey Biryukov
0ba13ec260 Tests: Use WP_HTTP_UnitTestCase::skipTestOnTimeout() in more HTTP tests.
Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

See #44613.

git-svn-id: https://develop.svn.wordpress.org/trunk@43511 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 19:09:56 +00:00
Sergey Biryukov
ffdc5e6827 Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.
Props XpertOne, idea15, garrett-eclipse.
Fixes #44130.

git-svn-id: https://develop.svn.wordpress.org/trunk@43508 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-19 12:09:31 +00:00
Sergey Biryukov
a1f6ba5477 Privacy: Use the actual Privacy Policy page title in get_the_privacy_policy_link().
Props desrosj, birgire, ianbelanger, Ov3rfly.
Fixes #44192.

git-svn-id: https://develop.svn.wordpress.org/trunk@43506 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:49:46 +00:00
Sergey Biryukov
7e4f59b28e I18N: Update list of continents and cities for the timezone selection.
Props soulseekah, dyrer.
Fixes #44574.

git-svn-id: https://develop.svn.wordpress.org/trunk@43504 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 11:20:28 +00:00
Sergey Biryukov
9daa08da8e Filesystem API: Skip https:// test for wp_is_stream() if openssl extension is not loaded.
See #44533.

git-svn-id: https://develop.svn.wordpress.org/trunk@43503 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 09:51:53 +00:00
Sergey Biryukov
6f0218d8bc Filesystem API: Add basic tests for wp_is_stream().
Props JPry.
See #44533.

git-svn-id: https://develop.svn.wordpress.org/trunk@43501 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-18 01:01:28 +00:00
Sergey Biryukov
b2d63fd056 Privacy: Add unit tests for _wp_privacy_send_request_confirmation_notification(), introduced in [43211].
Props birgire, desrosj, garrett-eclipse.
Fixes #43967.

git-svn-id: https://develop.svn.wordpress.org/trunk@43499 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 22:55:51 +00:00
Sergey Biryukov
df7b163a31 Privacy: Mark Privacy Policy page as such in the Pages list table.
Props desrosj, subrataemfluence, ianbelanger, danieltj.
Fixes #44006.

git-svn-id: https://develop.svn.wordpress.org/trunk@43495 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:45:04 +00:00
Sergey Biryukov
a8b83cf91a Twenty Seventeen: Correct list item style for nested unordered lists.
Props macbookandrew, audrasjb.
Fixes #44109.

git-svn-id: https://develop.svn.wordpress.org/trunk@43493 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:34:57 +00:00
Sergey Biryukov
121215092c Docs: Change @since entry for WP_Term_Query::populate_terms() added in [43049] to 4.9.8.
See #42691.

git-svn-id: https://develop.svn.wordpress.org/trunk@43491 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:24:35 +00:00
Sergey Biryukov
f75b58113d Privacy: Enable pagination screen options for privacy requests list tables.
Props birgire, pbiron.
Fixes #44025.

git-svn-id: https://develop.svn.wordpress.org/trunk@43486 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 16:03:59 +00:00
Andrew Ozz
590d18844b Customize: Do not attempt to count uncountable value.
Props dlh.
Fixes #44104.

git-svn-id: https://develop.svn.wordpress.org/trunk@43480 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:37:21 +00:00
Sergey Biryukov
d25cf1c907 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.
Fixes #44181.

git-svn-id: https://develop.svn.wordpress.org/trunk@43478 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 14:14:47 +00:00
Andrew Ozz
7a86b55763 Privacy: Add $request to $email_data to make it available to all filters.
Props desrosj.
Fixes #44379.

git-svn-id: https://develop.svn.wordpress.org/trunk@43477 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 13:52:43 +00:00
Andrew Ozz
6612d0e452 Privacy: Add filter for the subject of the erasure complete notification emails.
Props desrosj.
Fixes #44265.

git-svn-id: https://develop.svn.wordpress.org/trunk@43475 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 13:41:33 +00:00
Andrew Ozz
c1ce7d134b Privacy: Fix tests after [43467].
See #44141.


git-svn-id: https://develop.svn.wordpress.org/trunk@43471 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:57:57 +00:00
Andrew Ozz
d8869384be Privacy: Add a setting to disable comment cookie consent.
Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/trunk@43469 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 09:07:29 +00:00
Andrew Ozz
b33deaf1b5 Privacy: Don't replace comment author URL and email with anything.
Props TZ-Media, desrosj, birgire.
Fixes #44141.

git-svn-id: https://develop.svn.wordpress.org/trunk@43467 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 08:59:30 +00:00
Gary Pendergast
6c8c2aeaf9 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.
Fixes #44532.



git-svn-id: https://develop.svn.wordpress.org/trunk@43466 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:53:18 +00:00
Gary Pendergast
8c55028c90 Privacy: Remove some unnecessary code comments.
[42967] introduced some WPCS-related comments, probably accidentally saved by an IDE.

Props burhandodhy.
Fixes #44590.



git-svn-id: https://develop.svn.wordpress.org/trunk@43465 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:42:23 +00:00
Gary Pendergast
93af027510 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.
Fixes #44341.



git-svn-id: https://develop.svn.wordpress.org/trunk@43464 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:37:29 +00:00
Gary Pendergast
98fd60fc67 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.
Fixes 44287.



git-svn-id: https://develop.svn.wordpress.org/trunk@43463 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:26:20 +00:00
Gary Pendergast
66f537e702 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.
Fixes #43751.



git-svn-id: https://develop.svn.wordpress.org/trunk@43462 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-17 07:21:50 +00:00
Sergey Biryukov
018779aca1 Docs: Change @since entry for add_inline_data action added in [42676] to 4.9.8.
See #36085.

git-svn-id: https://develop.svn.wordpress.org/trunk@43460 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 15:26:57 +00:00
Sergey Biryukov
2b539c3a91 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.
Fixes #44052.

git-svn-id: https://develop.svn.wordpress.org/trunk@43457 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 14:09:22 +00:00
Sergey Biryukov
dec7594a9b Privacy: Change @since entry for _wp_privacy_settings_filter_draft_page_titles() added in [43376] to 4.9.8.
See #44100.

git-svn-id: https://develop.svn.wordpress.org/trunk@43454 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 13:47:36 +00:00
Sergey Biryukov
83e8e6c003 Privacy: Change @since entry for user_request_confirmed_email_subject filter added in [43373] to 4.9.8.
See #44382.

git-svn-id: https://develop.svn.wordpress.org/trunk@43451 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 12:11:14 +00:00
Andrew Ozz
facf361e88 TinyMCE: update to 4.8.0, changelog: https://www.tiny.cloud/docs/changelog/#version480july112018
Fixes #44134.

git-svn-id: https://develop.svn.wordpress.org/trunk@43447 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-16 08:06:32 +00:00
Aaron Jorbin
f673d1851c 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.

Fixes #44195.
Props audrasjb, rafsuntaskin, Ov3rfly, johnbillion, pento



git-svn-id: https://develop.svn.wordpress.org/trunk@43446 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-15 23:38:14 +00:00
Gary Pendergast
4c8daa87bd REST API: Update the test fixture generator following [43439]
As [43439] added data that contains object IDs, it can cause `wp-api-generated.js` to be unnecessarily regenerated.

Regenerating our list of fixtures that need normalising rectifies this.

See #44321.



git-svn-id: https://develop.svn.wordpress.org/trunk@43441 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 04:45:35 +00:00
Gary Pendergast
46c238ca78 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.

Props danielbachhuber.
Fixes #44096.



git-svn-id: https://develop.svn.wordpress.org/trunk@43440 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 04:23:35 +00:00
Gary Pendergast
585c862faf 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.

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



git-svn-id: https://develop.svn.wordpress.org/trunk@43439 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-13 04:06:23 +00:00
Gary Pendergast
81d2390d29 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.

Props TimothyBlynJacobs, danielbachhuber.
Fixes #44287.



git-svn-id: https://develop.svn.wordpress.org/trunk@43437 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-11 06:22:10 +00:00
Sergey Biryukov
7569772234 Plugins: Disable "Install Now" button for plugins that require a higher version of PHP or WordPress.
Display a notice with an explanation and the steps required to resolve the issue.

Props afragen, schlessera, flixos90, nerrad, melchoyce, boemedia, hedgefield, joyously, johnalarcon, lakenh, afercia, acirujano, ibantxillo, SergeyBiryukov.
Fixes #43986.

git-svn-id: https://develop.svn.wordpress.org/trunk@43436 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-09 13:44:53 +00:00
Felix Arntz
3d85e311ef Privacy: Fix a further inconsistency of site name and URL usage in notification emails.
This is a follow-up to [43388].

Props desrosj.
Fixes #44396.


git-svn-id: https://develop.svn.wordpress.org/trunk@43435 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-08 13:54:02 +00:00
John Blackbourn
f584b5755a Date/Time: Add support for the c and r shorthand formats in date_i18n().
Props Rarst, pbearne

Fixes #20973


git-svn-id: https://develop.svn.wordpress.org/trunk@43434 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 23:10:01 +00:00
John Blackbourn
adbec850ef Media: Update the @since tag for wp_normalize_path() as this has been backported to th 3.9 (and all other) branches.
See #42837


git-svn-id: https://develop.svn.wordpress.org/trunk@43406 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 15:20:46 +00:00
John Blackbourn
0f5488c3fc Media: Limit thumbnail file deletions to the same directory as the original file.
git-svn-id: https://develop.svn.wordpress.org/trunk@43392 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 14:31:24 +00:00
Anton Timmermans
ec9d77b103 Docs: Fix default values for customize/controls.js.
The old values cannot be parsed by JSDoc.

Props herregroen.
Fixes #44520.


git-svn-id: https://develop.svn.wordpress.org/trunk@43391 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 14:06:01 +00:00
Felix Arntz
b4d8e87464 Tests: Fix failing test after [43388].
Fixes #44396.


git-svn-id: https://develop.svn.wordpress.org/trunk@43390 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-05 08:52:06 +00:00