Commit Graph

38100 Commits

Author SHA1 Message Date
atimmer
49bf485724 Build tools: Build @wordpress packages with webpack.
We decided to split the media webpack config into it's own file. The
main webpack config then combines this file with the packages config.

Include vendor scripts by copying them. We copy the minified files if
they are available. If they aren't available we minify the original
files ourselves.

Props omarreiss, herregroen, gziolo, youknowriad, netweb, adamsilverstein.
See #45065.

Built from https://develop.svn.wordpress.org/branches/5.0@43719


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:49:31 +00:00
Sergey Biryukov
047949afab Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.
Merges [43601] to the 5.0 branch.
Fixes #44620.
Built from https://develop.svn.wordpress.org/branches/5.0@43718


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 08:14:23 +00:00
Sergey Biryukov
b7de0935b9 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, SergeyBiryukov.
Merges [42695] and [42702] to the 5.0 branch.
Fixes #43255.
Built from https://develop.svn.wordpress.org/branches/5.0@43717


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43546 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 08:11:23 +00:00
Sergey Biryukov
a6a20b29d8 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 5.0 branch.
Fixes #40510.
Built from https://develop.svn.wordpress.org/branches/5.0@43716


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 07:16:46 +00:00
Sergey Biryukov
c288d39db2 REST API: Pass correct ID to meta->update_value to permit setting term meta during term creation.
Props joehoyle.
Merges [43636] to the 5.0 branch.
Fixes #44834.
Built from https://develop.svn.wordpress.org/branches/5.0@43714


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43543 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 06:35:23 +00:00
Sergey Biryukov
b9fb2a42b1 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 5.0 branch.
Fixes #39122.
Built from https://develop.svn.wordpress.org/branches/5.0@43713


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 06:32:22 +00:00
Sergey Biryukov
531992ff1d Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0.
Props joyously, SergeyBiryukov.
Merges [43605] to the 5.0 branch.
Fixes #44872.
Built from https://develop.svn.wordpress.org/branches/5.0@43712


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43541 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:42:49 +00:00
Sergey Biryukov
37dcf205e6 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 5.0 branch.
Fixes #44915.
Built from https://develop.svn.wordpress.org/branches/5.0@43710


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:32:22 +00:00
Sergey Biryukov
f9ba011f33 Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Merges [43609] to the 5.0 branch.
Fixes #44877.
Built from https://develop.svn.wordpress.org/branches/5.0@43709


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:31:23 +00:00
Sergey Biryukov
7bd842a4ef Docs: Update $meta_type descriptions to include ’term’ as a valid type in meta.php and class-wp-term-query.php.
Props macbookandrew.
Merges [43557] to the 5.0 branch.
Fixes #44751.
Built from https://develop.svn.wordpress.org/branches/5.0@43706


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43535 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:15:23 +00:00
Sergey Biryukov
4af0279f2a Embeds: Avoid a JS error in wp.receiveEmbedMessage if data parameter is not set.
Props dsifford, kadamwhite.
Merges [43593] and [43597] to the 5.0 branch.
Fixes #44832.
Built from https://develop.svn.wordpress.org/branches/5.0@43704


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43533 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 04:00:23 +00:00
Sergey Biryukov
269fb1276f Docs: Convert @see reference in wp_checkdate() DocBlock to @link.
Props WiZZarD_.
Merges [43599] to the 5.0 branch.
Fixes #44866.
Built from https://develop.svn.wordpress.org/branches/5.0@43703


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 03:56:22 +00:00
Sergey Biryukov
7860cb4a83 Customize: Increase the colour contrast of the line numbers in CodeMirror.
Props earnjam, abdullahramzan, audrasjb, Luminus.
Merges [43574] to the 5.0 branch.
Fixes #44763.
Built from https://develop.svn.wordpress.org/branches/5.0@43700


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 03:42:22 +00:00
Sergey Biryukov
15d1c6398c 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 5.0 branch.
Fixes #44815. See #43308.
Built from https://develop.svn.wordpress.org/branches/5.0@43697


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 03:23:22 +00:00
Sergey Biryukov
a2343dc51b Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
Merges [43512] to the 5.0 branch.
Fixes #44613.
Built from https://develop.svn.wordpress.org/branches/5.0@43696


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 03:20:22 +00:00
Sergey Biryukov
d0ecbb107e 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 5.0 branch.
See #44613.
Built from https://develop.svn.wordpress.org/branches/5.0@43695


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43524 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-11 03:18:23 +00:00
danielbachhuber
4bf87727a4 REST API: Enable users with read_private_posts to query for them.
An authorized request with the `read_private_posts` capability for a post type should be able to `GET /wp/v2/posts` for posts of `status=private`. This query is further sanity-checked by `WP_REST_Posts_Controller->check_read_permission()`, which is unchanged.

Props rachelbaker, soulseekah, twoelevenjay.
Fixes #43701.

Built from https://develop.svn.wordpress.org/branches/5.0@43694


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 20:49:23 +00:00
John Blackbourn
b9e3d4c42e General: Instruct file editors not to trim trailing whitespace in markdown files.
Two trailing spaces in a markdown file indicates a line break.

Props netweb

Fixes #43104

Merges [42862] to the 5.0 branch.

Built from https://develop.svn.wordpress.org/branches/5.0@43693


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 16:29:24 +00:00
John Blackbourn
1116c494b6 Build/Test Tools: Add PHP7.3 RC1 to the build matrix
Currently, we need to do some extra steps to run 7.3, but this will help us with testing compatibility.

See: https://github.com/travis-ci/travis-ci/issues/9717

See #44771.

Merges [43673] to the 5.0 branch.

Built from https://develop.svn.wordpress.org/branches/5.0@43692


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43521 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 16:09:23 +00:00
danielbachhuber
8a5e5b0cf9 REST API: Load missing required file for multisite users
Requires wp-admin/includes/ms.php to make `upload_is_user_over_quota()` function available to multisite users uploading files.

Props JakePT, rachelbaker.
Merges [43603] to the 5.0 branch.
Fixes #44864.

Built from https://develop.svn.wordpress.org/branches/5.0@43691


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43520 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 12:37:24 +00:00
Boone Gorges
d3fb6d96c4 Correct param documentation for WP_Term_Query.
The description of `$meta_type` introduced in [40053] was incorrect.

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

Built from https://develop.svn.wordpress.org/branches/5.0@43689


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:16:47 +00:00
atimmer
3810f7a3ef Build tools: Upgrade webpack to version 4.
* Minification is done by uglify, so disable that in the media build.
* The webpack boilerplate has changed, which explains the changes in the build files.
* `ModuleConcatenationPlugin` is enable by default for production builds so we don't have to specify that ourselves.

See #45065.

Built from https://develop.svn.wordpress.org/branches/5.0@43688


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:16:23 +00:00
atimmer
ccb4e22896 Build tools: Combine webpack config files.
This prepares us for building the Gutenberg packages.

See #45065.

Built from https://develop.svn.wordpress.org/branches/5.0@43687


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:11:47 +00:00
Aaron Jorbin
dda1111bdf Build/Test Tools: Revert grunt-contrib-uglify update
Follow up to [43684].
See #45064.

Built from https://develop.svn.wordpress.org/branches/5.0@43686


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:11:25 +00:00
Aaron Jorbin
399e1315c9 Build/Test: Use same grunt-qunit as trunk for 5.0
See [43684].
See #45064.

Built from https://develop.svn.wordpress.org/branches/5.0@43685


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-10 04:07:28 +00:00
Aaron Jorbin
a870c7e8f3 Build/Test: Update dependencies for 5.0
Updates package dependencies to more modern versions, also adds .nvmrc and package-lock.json as followups to [43683] and [43571].

See #44600.
Fixes #45064.


Built from https://develop.svn.wordpress.org/branches/5.0@43684


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-09 02:52:45 +00:00
Aaron Jorbin
f08a2c6ef5 Build/Test: Remove npm-shrinkwrap.json
Shrinkwraping is done to keep dependencies the same. Historically, WordPress Core has done it after a release. As the 5.0 branch was created from the 4.9.8 tag which was created from the 4.9 branch, it included it. The 5.0 branch will have some dependency updates so this shrinkwrap is not needed here.

See #45064.

Built from https://develop.svn.wordpress.org/branches/5.0@43683


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-09 02:09:23 +00:00
danielbachhuber
bc07c9dd9f REST API: Declare unfiltered_html capability in links.
Because user capabilities can be modified at runtime, the REST API needs to expose them in some evaluated but declarative manner for clients to interpret. JSON Hyper Schema `targetSchema` provides an appropriate paradigm for doing so.

Props timothyblynjacobs.
Fixes #45014.

Built from https://develop.svn.wordpress.org/branches/5.0@43682


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43511 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-08 22:45:25 +00:00
danielbachhuber
c1ddf45869 REST API: Persist attributes for attachment links
In [43437], the link definition implementation caused attachment links to be unexpectedly nested under an `attributes` key. This changeset restores the prior behavior.

Props TimothyBlynJacobs.
Fixes #44750.

Built from https://develop.svn.wordpress.org/branches/5.0@43681


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-08 18:19:28 +00:00
danielbachhuber
62a35c8545 REST API: Define taxonomy visibility settings in schema
For Gutenberg and other admin-type interfaces, it's
useful to be able to see the visibility settings for
taxonomies.

The original changeset was partially included in [43445].

Merges [42729], [42730], [42973] to the 5.0 branch.
Props joehoyle, TimothyBlynJacobs, pento.
Fixes #42707

Built from https://develop.svn.wordpress.org/branches/5.0@43680


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-08 13:50:27 +00:00
Gary Pendergast
01f1bf13c3 Bump the 5.0 branch package.json version to 5.0.0.
Built from https://develop.svn.wordpress.org/branches/5.0@43679


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-05 20:44:23 +00:00
Gary Pendergast
47c819c37a Bump 5.0 branch version to 5.0-alpha.
Built from https://develop.svn.wordpress.org/branches/5.0@43676


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-05 20:18:57 +00:00
Gary Pendergast
a624763441 Branch 5.0 from 4.9.8
Built from https://develop.svn.wordpress.org/branches/5.0@43675


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-05 20:14:13 +00:00
Dominik Schilling
1a4685de9f Tag 4.9.8
Built from https://develop.svn.wordpress.org/tags/4.9.8@43553


git-svn-id: http://core.svn.wordpress.org/tags/4.9.8@43382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-02 21:33:13 +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