Commit Graph

38045 Commits

Author SHA1 Message Date
Adam Silverstein
b250096446 Try Gutenberg callout: improve formatting for Internet Explorer 11.
Correct an issue where the layout of the "Try Gutenberg" callout added in #41316 falls apart under IE11.

Props kjellr, ianbelanger, pbiron, Luciano Croce, belcherj, ryansommers.     
Fixes #44742.

Built from https://develop.svn.wordpress.org/branches/4.9@43674


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-05 14:51:26 +00:00
Sergey Biryukov
1963afa5ff General: PHP 7.3 throws an E_WARNING when using continue to target a switch.
Applying continue to a switch is equivalent to using break and quite possibly, a continue targeting a higher level control structure is actually intended.

To target the higher level control structure, a numeric argument has to be passed to continue. This fixes two cases in WordPress Core where this is currently happening.

See: https://github.com/php/php-src/pull/3364
See: https://wiki.php.net/rfc/continue_on_switch_deprecation

Props jrf.
Merges [43653] to the 4.9 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/4.9@43656


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-24 20:05:29 +00:00
Mike Schroder
47fdbd4add Media: In WP_Image_Editor::make_image(), close previously opened output buffer if the file could not be created.
In addition to the merge noted below, includes important brackets added in [42343].

Props dhanendran, gnif, sergey.
Merges [42695] and [42702] to the 4.9 branch.
Fixes #43255.


Built from https://develop.svn.wordpress.org/branches/4.9@43649


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-18 22:02:28 +00:00
Sergey Biryukov
a5c8e5caa3 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43648


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-18 03:55:26 +00:00
Sergey Biryukov
6793aad486 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43646


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43475 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-18 03:30:28 +00:00
Sergey Biryukov
f0001b7423 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43639


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-13 10:22:24 +00:00
Sergey Biryukov
1c7d7b7c15 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43637


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-13 09:53:28 +00:00
Sergey Biryukov
3941885dc0 Taxonomy: Introduce new hooks when registering/unregistering taxonomies for object types.
Props soulseekah.
Merges [43558] and [43631] to the 4.9 branch.
Fixes #44733.
Built from https://develop.svn.wordpress.org/branches/4.9@43632


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-06 07:51:26 +00:00
Sergey Biryukov
f18b19bac9 Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
Merges [43512] to the 4.9 branch.
Fixes #44613.
Built from https://develop.svn.wordpress.org/branches/4.9@43626


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43455 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:56:26 +00:00
Sergey Biryukov
f2dc2970ba 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43625


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43454 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:53:24 +00:00
Sergey Biryukov
c04ce8198b 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43624


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:47:25 +00:00
Sergey Biryukov
7296f063d7 Help/About: Ensure the space after the period for the 4.9.8 changelog entry is preserved.
Props chetan200891, burhandodhy, swissspidy.
Fixes #44717.
Built from https://develop.svn.wordpress.org/branches/4.9@43622


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:36:26 +00:00
Sergey Biryukov
197fe91d39 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43621


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:26:26 +00:00
Sergey Biryukov
9016ffbafa Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0.
Props joyously, SergeyBiryukov.
Merges [43605] to the 4.9 branch.
Fixes #44872.
Built from https://develop.svn.wordpress.org/branches/4.9@43620


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:24:25 +00:00
Sergey Biryukov
934d7cf523 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43619


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:21:26 +00:00
Sergey Biryukov
a3ff44115b 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43618


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:17:25 +00:00
Sergey Biryukov
86d55bcfeb 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43617


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43446 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:12:26 +00:00
Sergey Biryukov
74ee7ba44a Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Merges [43609] to the 4.9 branch.
Fixes #44877.
Built from https://develop.svn.wordpress.org/branches/4.9@43615


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43444 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:04:26 +00:00
Sergey Biryukov
a69b052f3f 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43614


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:01:26 +00:00
Sergey Biryukov
ad1bdb7e98 Tests: Add case for wp_privacy_delete_old_export_files().
Props allendav.
Merges [43292] to the 4.9 branch.
See #43546.
Built from https://develop.svn.wordpress.org/branches/4.9@43613


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43442 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 21:00:27 +00:00
Sergey Biryukov
b28946e62c Tests: Add case for wp_privacy_send_personal_data_export_email().
Props birgire.
Merges [43291] to the 4.9 branch.
See #43546.
Built from https://develop.svn.wordpress.org/branches/4.9@43612


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 20:59:24 +00:00
Sergey Biryukov
cb0da304a4 Customize: Pass missing parameter to dynamic option_{$option} filter in WP_Customize_Widgets::capture_filter_pre_get_option().
Props dlh.
Fixes #44770.
Built from https://develop.svn.wordpress.org/branches/4.9@43611


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 20:52:26 +00:00
Sergey Biryukov
fcfa34bd6c Docs: Convert @see reference in wp_checkdate() DocBlock to @link.
Props WiZZarD_.
Merges [43599] to the 4.9 branch.
Fixes #44866.
Built from https://develop.svn.wordpress.org/branches/4.9@43610


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43439 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 20:50:27 +00:00
Peter Wilson
02b1ba4744 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.


Built from https://develop.svn.wordpress.org/branches/4.9@43607


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43436 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-03 01:32:25 +00:00
John Blackbourn
e052467e89 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.

Built from https://develop.svn.wordpress.org/branches/4.9@43602


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-31 10:53:27 +00:00
Sergey Biryukov
e92c6a2817 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43600


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-31 06:29:28 +00:00
John Blackbourn
f4f66b96b1 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.

Built from https://develop.svn.wordpress.org/branches/4.9@43575


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-19 11:03:27 +00:00
Rachel Baker
26ba67787c 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43557


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-08 16:28:26 +00:00
Dominik Schilling
f165c75d01 Branch 4.9 is now 4.9.9-alpha.
Built from https://develop.svn.wordpress.org/branches/4.9@43554


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 21:36:26 +00:00
Dominik Schilling
4ae8f8d4e6 Bump 4.9 branch to version 4.9.8.
Built from https://develop.svn.wordpress.org/branches/4.9@43552


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 20:13:24 +00:00
Sergey Biryukov
c6e2c61454 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43551


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 16:43:30 +00:00
Aaron Campbell
fe08364556 Post WordPress 4.9.8 RC 3 version bump.
Built from https://develop.svn.wordpress.org/branches/4.9@43547


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-31 20:26:26 +00:00
Aaron Campbell
924e124a79 WordPress 4.9.8 RC 3.
Built from https://develop.svn.wordpress.org/branches/4.9@43546


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-31 20:06:28 +00:00
Aaron Jorbin
9f6f75bd8b 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.


Built from https://develop.svn.wordpress.org/branches/4.9@43544


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-31 14:52:28 +00:00
Aaron Campbell
08f6d4873b Post WordPress 4.9.8 RC 2 version bump.
Built from https://develop.svn.wordpress.org/branches/4.9@43539


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-26 22:56:25 +00:00
Aaron Campbell
69fe41fc39 WordPress 4.9.8 RC 2.
Built from https://develop.svn.wordpress.org/branches/4.9@43538


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-26 22:40:25 +00:00
Sergey Biryukov
deee543f0d 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43537


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-26 15:06:26 +00:00
Gary Pendergast
da5f52aae3 Dashboard: Tweak the "Try Gutenberg" subheading line height.
Props pento, pbiron, afercia, SergeyBiryukov.
Fixes #44627.


Built from https://develop.svn.wordpress.org/branches/4.9@43536


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-26 03:54:24 +00:00
Aaron Campbell
e3bce2d81a Post WordPress 4.9.8 RC 1 version bump.
Built from https://develop.svn.wordpress.org/branches/4.9@43534


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 19:47:26 +00:00
Aaron Campbell
fccc99f43f WordPress 4.9.8 RC 1.
Built from https://develop.svn.wordpress.org/branches/4.9@43533


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 18:51:25 +00:00
Sergey Biryukov
e7c1553bde 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43532


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 17:08:26 +00:00
Sergey Biryukov
4c11410c58 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43530


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 16:54:26 +00:00
Sergey Biryukov
fa163b9c0a I18N: Separate two "About" strings with different context.
Props desrosj, XpertOne, Nao.
Merges [43527] to the 4.9 branch.
Fixes #44139.
Built from https://develop.svn.wordpress.org/branches/4.9@43528


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 15:06:26 +00:00
Sergey Biryukov
c0a7aaf659 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43526


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 12:53:26 +00:00
Sergey Biryukov
92096f4c64 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.
Built from https://develop.svn.wordpress.org/branches/4.9@43524


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 12:43:28 +00:00
Gary Pendergast
b20bfba009 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.


Built from https://develop.svn.wordpress.org/branches/4.9@43523


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 03:05:26 +00:00
Gary Pendergast
a9ea4a1f7d 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.


Built from https://develop.svn.wordpress.org/branches/4.9@43522


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-24 02:52:29 +00:00
Aaron Campbell
67256370f1 Post WordPress 4.9.8 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/branches/4.9@43516


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 20:48:27 +00:00
Aaron Campbell
1f9acd5fec WordPress 4.9.8 Beta 2.
Built from https://develop.svn.wordpress.org/branches/4.9@43515


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 20:25:24 +00:00
Sergey Biryukov
0dfd159712 Privacy: Improve grammar on Privacy Settings screen.
Props ianbelanger, garrett-eclipse.
Merges [43513] to the 4.9 branch.
Fixes #44612.
Built from https://develop.svn.wordpress.org/branches/4.9@43514


git-svn-id: http://core.svn.wordpress.org/branches/4.9@43343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-07-19 20:16:26 +00:00