38334 Commits

Author SHA1 Message Date
Gary Pendergast
bb60df4a8c Posts: Remove the slug from Quick Edit for CPTs with publicly_queryable disabled.
In the full edit screen, CPTs that have disabled the `publicly_queryable` option will hide the slug field, as it doesn't need to be edited. This change brings the Quick Edit view into line with that behaviour.

Merges [43664] to the 5.0 branch.

Props bhargavmehta, krutidugade.
Fixes #43278.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43728 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-15 05:34:48 +00:00
Peter Wilson
c4052edfe9 KSES: Allow HTML data-* attributes.
Add global support for HTML attributes prefixed `data-` for authors and contributors, as required by the new editor.

Props azaozz, peterwilsoncc.
Fixes #33121.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43727 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-15 05:21:04 +00:00
Aaron Jorbin
06edce07fa Build/Test Tools: Use 7.3 for PHP 7.3
Travis now supports PHP7.3 without workarounds, so let's remove the workarounds.

Previously [43692].

See #44771.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43726 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-15 02:47:44 +00:00
Gary Pendergast
9ee5c9da71 Build/Test Tools: Remove an extra line incorrectly included in [43724].
See #44858.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43725 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-13 03:10:50 +00:00
Gary Pendergast
6cd32e3cc9 Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.
This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times.

Merges [43645] to the 5.0 branch.

Props johnbillion.
Fixes #44858.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43724 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-13 02:51:34 +00:00
Anton Timmermans
647fa41636 Script loader: Register @wordpress scripts.
This allows the packages to be consumed by plugins and core itself.
The code has been based on the work done in the Gutenberg plugin.

We've added an array with all the packages and the vendor packages to
loop through. This sets a convention so all packages will be
registered in the same way. This array can eventually be generated by
a webpack plugin.

We need to register TinyMCE explicitly. Previously TinyMCE was used
by inserting custom `<script>` tags into the relevant admin pages.
This is not suitable for the new editor, so we need to explicitly
register TinyMCE. We could, in the future, refactor the custom
`<script>` tags to use the registered TinyMCE script instead.

Polyfills are inserted into the page only when necessary using
`document.write`.

Props omarreiss, herregroen, youknowriad, gziolo.
Fixes #45065.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43723 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-12 11:43:50 +00:00
Sergey Biryukov
d8fc849b9e Database: In require_wp_db(), check if database constants are defined before using them.
Otherwise, `wp-admin/setup-config.php` triggers an undefined constant warning in PHP 7.2.

Props mariusvw, jryancard for initial patch.
Merges [42701] to the 5.0 branch.
Fixes #35560.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43722 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-12 11:15:46 +00:00
Sergey Biryukov
007afd4fd0 Build: Bump the version of node used on Travis to match package.json for 5.0.
See [43684].
See #45064.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43721 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 23:13:42 +00:00
Daniel Bachhuber
d7f287b50b REST API: Include permalink_template/generated_slug for Posts
In order for clients to present permalink previews, the REST API must share the computed results of `get_sample_permalink()`. These two values are now exposed as `permalink_template` and `generated_slug` for public, viewable post types, but only for `context=edit`.

Props danielbachhuber, rahulsprajapati.
Fixes #45017.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43720 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 22:24:51 +00:00
Anton Timmermans
2588c1cae2 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43719 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 10:00:16 +00:00
Sergey Biryukov
cd6baabaf9 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43718 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 08:13:51 +00:00
Sergey Biryukov
1834c52a6a 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43717 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 08:10:54 +00:00
Sergey Biryukov
b513113c49 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43716 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 07:15:34 +00:00
Sergey Biryukov
184cf32e34 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43714 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 06:34:34 +00:00
Sergey Biryukov
0df2b51e80 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43713 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 06:31:43 +00:00
Sergey Biryukov
3b405ba347 Taxonomy: Make sure wp_list_categories() correctly outputs term name of 0.
Props joyously, SergeyBiryukov.
Merges [43605] to the 5.0 branch.
Fixes #44872.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43712 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 04:41:39 +00:00
Sergey Biryukov
509cc81e21 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43710 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 04:31:48 +00:00
Sergey Biryukov
130cd44368 Docs: Correct parameter type for WP_Privacy_Policy_Content::notice().
Props burhandodhy.
Merges [43609] to the 5.0 branch.
Fixes #44877.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43709 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 04:30:10 +00:00
Sergey Biryukov
e260e6e58d 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43706 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 04:14:14 +00:00
Sergey Biryukov
96cfe6ec46 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43704 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:59:14 +00:00
Sergey Biryukov
c27403d303 Docs: Convert @see reference in wp_checkdate() DocBlock to @link.
Props WiZZarD_.
Merges [43599] to the 5.0 branch.
Fixes #44866.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43703 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:55:15 +00:00
Sergey Biryukov
f959dfb850 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43700 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:41:07 +00:00
Sergey Biryukov
51899b6a7e 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43697 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:22:59 +00:00
Sergey Biryukov
c95bf0c377 Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.
Merges [43512] to the 5.0 branch.
Fixes #44613.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43696 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:19:47 +00:00
Sergey Biryukov
f489011a90 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43695 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-11 03:17:44 +00:00
Daniel Bachhuber
f5c8be7077 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43694 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-10 20:48:21 +00:00
John Blackbourn
99f178c4cd 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43693 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-10 16:28:32 +00:00
John Blackbourn
27e2f6a820 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43692 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-10 16:08:12 +00:00
Daniel Bachhuber
bc6c4962e9 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43691 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-10 12:36:40 +00:00
Boone Gorges
70b303c1c4 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43689 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 18:08:03 +00:00
Anton Timmermans
d1373c8af6 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43688 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 09:33:36 +00:00
Anton Timmermans
404dabf1f8 Build tools: Combine webpack config files.
This prepares us for building the Gutenberg packages.

See #45065.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43687 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 08:30:09 +00:00
Aaron Jorbin
d2c93a4e64 Build/Test Tools: Revert grunt-contrib-uglify update
Follow up to [43684].
See #45064.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43686 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 04:43:30 +00:00
Aaron Jorbin
f24452eb46 Build/Test: Use same grunt-qunit as trunk for 5.0
See [43684].
See #45064.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43685 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 03:25:21 +00:00
Aaron Jorbin
bb3dc305dd 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.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43684 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 02:51:32 +00:00
Aaron Jorbin
72f676a754 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43683 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-09 02:08:52 +00:00
Daniel Bachhuber
d3488487cd 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43682 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-08 22:44:05 +00:00
Daniel Bachhuber
9dd758a32d 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.


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43681 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-08 18:18:25 +00:00
Daniel Bachhuber
ccf66142cc 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


git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43680 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-08 13:49:51 +00:00
Gary Pendergast
5655a9acbf Bump the 5.0 branch package.json version to 5.0.0.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43679 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-05 20:43:28 +00:00
Gary Pendergast
8ba02e0390 Bump 5.0 branch version to 5.0-alpha.
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43676 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-05 20:17:28 +00:00
Gary Pendergast
4464ae8826 Branch 5.0 from 4.9.8
git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43675 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-05 20:13:34 +00:00
Dominik Schilling (ocean90)
5d477aa706 Tag 4.9.8
git-svn-id: https://develop.svn.wordpress.org/tags/4.9.8@43553 602fd350-edb4-49c9-b593-d223f7449a82
4.9.8
2018-08-02 21:32:41 +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