38117 Commits

Author SHA1 Message Date
Sergey Biryukov
dc70d3e266 REST API: Support pagination, order, search and other common query parameters for revisions.
The original REST API revisions controller relied on `wp_get_post_revisions()`, getting all revisions of a post without any possibility to restrict the result. This changeset replaces that function call with a proper `WP_Query` setup, replicating how `wp_get_post_revisions()` works while offering parameters to alter the default behavior.

Props adamsilverstein, birgire, flixos90.
Merges [43584-43586], [43647] to the 4.9 branch.
Fixes #40510.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43648 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-18 03:54:20 +00:00
Sergey Biryukov
c50b216b50 Tests: Improve coverage for REST API term meta registration.
Introduce tests to validate that register_meta and register_term_meta work as expected in WP_REST_Terms_Controller.

Props timmydcrawford.
Merges [43567] to the 4.9 branch.
See #39122.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43646 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-18 03:29:41 +00:00
Sergey Biryukov
13bd954199 Docs: Correct @since value for _wp_privacy_statuses().
Fix typo in `@since` entry for `WP_Privacy_Policy_Content:add()`.

Props dimadin.
Merges [43638] to the 4.9 branch.
Fixes #44915.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43639 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-13 10:21:19 +00:00
Sergey Biryukov
e44849ece7 REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.
Props joehoyle.
Merges [43636] to the 4.9 branch.
Fixes #44834.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43637 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-13 09:52:47 +00:00
Sergey Biryukov
bf71d67159 Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.
Props soulseekah.
Merges [43558] and [43631] to the 4.9 branch.
Fixes #44733.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43632 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-06 07:50:29 +00:00
Sergey Biryukov
4c6175e800 Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
Merges [43512] to the 4.9 branch.
Fixes #44613.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43626 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:55:42 +00:00
Sergey Biryukov
9e8090fcee 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".

Merges [43511] to the 4.9 branch.
See #44613.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43625 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:52:48 +00:00
Sergey Biryukov
aadaa64d03 Privacy: When clicking a confirmation link for a privacy request, return a WP_Error object if the link has expired.
Returning a string caused a success message to be displayed instead of the correct error message.

Props desrosj.
Merges [43623] to the 4.9 branch.
Fixes #44685.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43624 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:46:48 +00:00
Sergey Biryukov
1b18dc5f51 Help/About: Ensure the space after the period for the 4.9.8 changelog entry is preserved.
Props chetan200891, burhandodhy, swissspidy.
Fixes #44717.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43622 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:35:04 +00:00
Sergey Biryukov
e4afee3576 Docs: Correct param documentation for WP_Term_Query.
The description of `$meta_type` introduced in [40053] was incorrect.

Props dlh.
Merges [43559] to the 4.9 branch.
Fixes #44608.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43621 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:25:53 +00:00
Sergey Biryukov
008a65d98d Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0.
Props joyously, SergeyBiryukov.
Merges [43605] to the 4.9 branch.
Fixes #44872.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43620 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:23:26 +00:00
Sergey Biryukov
f8b390c4ff Customize: Safeguard a check on the customize_validate_{$setting_id} filter value to ensure it is a WP_Error.
While the filter is documented to only support a `WP_Error`, it has been a common practice to return true in a validation function if no errors have occurred. This was already caught when the same filter was executed in `WP_Customize_Setting`, it was however missing in `WP_Customize_Manager::validate_setting_values()`.

Props flixos90.
Merges [43578] to the 4.9 branch.
Fixes #44809.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43619 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:20:58 +00:00
Sergey Biryukov
0839d324af Script loader: remove (PHP based) compression from load-styles.php and load-scripts.php. WIth the amount of scripts and stylesheets grown a lot over the years, it has become pretty slow and consumes a lot of server resources. Also, most servers are set to compress PHP output anyway.
Props LucasRolff, azaozz.
Merges [43580] to the 4.9 branch.
Fixes #44815. See #43308.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43618 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:16:27 +00:00
Sergey Biryukov
29e5fe2238 Posts, Post Types: Introduce edit_post_{$post->post_type} hook.
The hook fires before the general `edit_post` hook and has the same parameters.

It also complements the `save_post_{$post->post_type}` hook added in [25050].

Props Mte90, garrett-eclipse.
Merges [43535] and [43616] to the 4.9 branch.
Fixes #34706.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43617 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:11:38 +00:00
Sergey Biryukov
6a09c56c6e Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Merges [43609] to the 4.9 branch.
Fixes #44877.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43615 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:03:12 +00:00
Sergey Biryukov
00ab86547f Privacy: Ensure the user request email is sent in the requested user's locale (or the site's default locale if they are not a registered user) when the administrator creating the request uses a different locale.
Props desrosj, Chouby, iandunn, lbenicio, birgire, earnjam, swissspidy, garrett-eclipse.
Merges [43568] to the 4.9 branch.
Fixes #43985.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43614 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 21:00:16 +00:00
Sergey Biryukov
90b39a69c8 Tests: Add case for wp_privacy_delete_old_export_files().
Props allendav.
Merges [43292] to the 4.9 branch.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43613 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 20:59:10 +00:00
Sergey Biryukov
1da5a8ba76 Tests: Add case for wp_privacy_send_personal_data_export_email().
Props birgire.
Merges [43291] to the 4.9 branch.
See #43546.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43612 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 20:58:08 +00:00
Sergey Biryukov
e123695582 Customize: Pass missing parameter to dynamic option_{$option} filter in WP_Customize_Widgets::capture_filter_pre_get_option().
Props dlh.
Fixes #44770.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43611 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 20:51:01 +00:00
Sergey Biryukov
89caf3bd3f Docs: Convert @see reference in wp_checkdate() DocBlock to @link.
Props WiZZarD_.
Merges [43599] to the 4.9 branch.
Fixes #44866.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43610 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 20:49:20 +00:00
Peter Wilson
577cf80a50 Twenty Sixteen: Add pre-connect resource hint for Google Fonts.
When using Google Fonts, pre-connect to https://fonts.gstatic.com to improve the performance downloading the webfont files.

Props westonruter.
Merges [43606] to the 4.9 branch.
Fixes #44668.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43607 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-03 01:31:22 +00:00
John Blackbourn
d432dbf776 Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.
Fixes #44620

Merges [43601] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43602 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-31 10:52:32 +00:00
Sergey Biryukov
216ff77268 Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.
Props dsifford, kadamwhite.
Merges [43593] and [43597] to the 4.9 branch.
Fixes #44832.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43600 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-31 06:28:27 +00:00
John Blackbourn
d7b6719f88 Customize: Increase the colour contrast of the line numbers in CodeMirror.
Props earnjam, abdullahramzan, audrasjb, Luminus

Fixes #44763

Merges [43574] to the 4.9 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43575 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-19 11:02:15 +00:00
Rachel Baker
a571771360 Docs: Update $meta_type descriptions to include ’term’ as a valid type in meta.php and class-wp-term-query.php.
Props macbookandrew.
Fixes #44751.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43557 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-08 16:27:34 +00:00
Dominik Schilling (ocean90)
99c5aa048f Branch 4.9 is now 4.9.9-alpha.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43554 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 21:35:32 +00:00
Dominik Schilling (ocean90)
6bd37cef4d Bump 4.9 branch to version 4.9.8.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43552 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 20:12:09 +00:00
Sergey Biryukov
d0c5d33f7d Twenty Seventeen: Bump version number and update changelog for 4.9.8 release.
Props pbiron, laurelfulford.
Merges [43541] and [43550] to the 4.9 branch.
Fixes #44646.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43551 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-02 16:42:18 +00:00
Aaron D. Campbell
86d2f52a04 Post WordPress 4.9.8 RC 3 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43547 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 20:25:35 +00:00
Aaron D. Campbell
f4b5cf668e WordPress 4.9.8 RC 3.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43546 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 20:05:54 +00:00
Aaron Jorbin
6887768ca1 Gutenberg: Restrict "Try Gutenberg" based on capability and gutenstatus
When Gutenberg is either not installed, or not activated, only show the callout to users with the `install_plugins` capability.
When Gutenberg is activated, expand that to include all users with the `edit_posts` capability.

4.9 branch commit.

Props pento.
Fixes #44680.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43544 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-31 14:51:33 +00:00
Aaron D. Campbell
6daa32bb6a Post WordPress 4.9.8 RC 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43539 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-26 22:55:29 +00:00
Aaron D. Campbell
140e33d824 WordPress 4.9.8 RC 2.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43538 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-26 22:39:43 +00:00
Sergey Biryukov
d76cec5bb0 Dashboard: Tweak the "Try Gutenberg" callout:
* Introduce `try_gutenberg_learn_more_link` filter that allows hosts or site owners to change the link, to provide extra information about Gutenberg, specific to their service.
* Only display the "Install" buttons if we're able to directly write to disk to install the plugins.
* Make sure the "Dismiss" link works correctly.

Props pento, andrew.taylor, leemon.
Fixes #41316.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43537 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-26 15:05:40 +00:00
Gary Pendergast
ae1b5b3ee2 Dashboard: Tweak the "Try Gutenberg" subheading line height.
Props pento, pbiron, afercia, SergeyBiryukov.
Fixes #44627.



git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43536 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-26 03:53:24 +00:00
Aaron D. Campbell
2ac2cbaafa Post WordPress 4.9.8 RC 1 version bump.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43534 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 19:46:32 +00:00
Aaron D. Campbell
b67cd00fe5 WordPress 4.9.8 RC 1.
git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43533 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 18:50:32 +00:00
Sergey Biryukov
8880871b78 Privacy: Revert [43525].
The commenter cookies checkbox is not legally required, so should be disabled by default.

Merges [43531] to the 4.9 branch.
Fixes #44373.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43532 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 17:07:19 +00:00
Sergey Biryukov
f147a718ab REST API: Ensure attachments created with WP_REST_Attachments_Controller::create_item() on Windows have a relative path.
Props ocean90, SergeyBiryukov, redcastor.
Merges [43529] to the 4.9 branch.
Fixes #40861.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43530 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 16:53:17 +00:00
Sergey Biryukov
054714aff3 I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Merges [43527] to the 4.9 branch.
Fixes #44139.

git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43528 602fd350-edb4-49c9-b593-d223f7449a82
2018-07-24 15:05:42 +00:00
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