Commit Graph

25359 Commits

Author SHA1 Message Date
Gary Pendergast
e0361726c2 Block Editor: Add an is_block_editor() method to WP_Screen.
This method allows checking (or setting) whether the block editor is loading on the current screen.

See #45037.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-22 02:06:40 +00:00
danielbachhuber
d6895a1e65 REST API: Render response in user locale with ?_locale=user.
Introduces new `determine_locale()` function for deciding the proper locale to use for a response. Default value is `get_user_locale()` in the admin, and `get_locale()` on the frontend. Because REST API requests are considered frontend requests, `?_locale=user` can be used to render the response in the user's locale.

Also updates `wp-login.php?wp_lang` implementation to benefit from this abstraction.

Props flixos90, mnelson4, swissspidy, TimothyBlynJacobs.
Fixes #44758.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-21 15:03:40 +00:00
Gary Pendergast
648850ea73 Revisions: Improve performance of WP_Text_Diff_Renderer_Table.
`WP_Text_Diff_Renderer_Table` is used to generate the diff view in revisions, but there were some cases that could cause it to take excessive amounts of time to run.

Some noteable cases include:
- When a large number of new lines were inserted in the middle of the post from one revision to the next.
- When both revisions contain >100 lines.
- When either revision contains a lot of long lines.

In one extreme test case, the diff view took over a minute to generate. With this change, it now takes less than a second.

See #35667.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-20 08:36:40 +00:00
Sergey Biryukov
bae53caa70 REST API: Restore Autosaves controller test for multisite.
PHPUnit 3.6.x requires `exclude` and `file` paths to be relative to the checkout root.

PHPUnit 4.0.0+ requires the paths to be relative to the configuration file.

See #45131.
Built from https://develop.svn.wordpress.org/branches/5.0@43774


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-20 04:21:38 +00:00
danielbachhuber
0a3bb63b8f REST API: Limit the scope of wp-admin files required in WP_REST_Attachments_Controller methods.
Narrow the scope of the included wp-admin files loaded for `wp_generate_attachment_metadata()`, `wp_handle_upload()`, `wp_tempnam()`, and `wp_handle_sideload()`. Requires only `wp-admin/includes/file.php` and `wp-admin/includes/image.php` instead of `wp-admin/includes/admin.php`.

Props ocean90, lonelyvegan, soulseekah, pratikthink.
Merges [43589], [43604] to the 5.0 branch.
Fixes #43757.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 18:53:41 +00:00
danielbachhuber
5a627786bf Help/About: Ensure the space after the period for the 4.9.8 changelog entry is preserved.
Props chetan200891, burhandodhy, swissspidy.
Merges [43622] to the 5.0 branch.
See #44717.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 18:41:40 +00:00
danielbachhuber
6c9675bf37 REST API: Handle api-request query parameters with plain permalinks.
When constructing the request URL, ensure that `?` is replaced with `&` when the API root already contains a `?`. Fixes an issue where requests were broken when sites had permalinks set to plain.

Props aduth.
Merges [42965] to the 5.0 branch.
Fixes #42382.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 18:33:39 +00:00
danielbachhuber
58ea8c82e4 REST API: Include block_version on Post content object.
The `block_version` denotes which version of Blocks the `post_content` contains. Introduces new `block_version()` function for versioning Blocks.

Props danielbachhuber, birgire.
Fixes #43887.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 17:58:39 +00:00
danielbachhuber
7700a3ef3e REST API: Skip Autosaves controller test for multisite.
There's some PHP 5.2 (cough, cough) edge case where paths calculated differently, possibly caused by differing version of PHPUnit.

See #45132, #45131, #43316.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 14:09:38 +00:00
danielbachhuber
50b0bf94c4 REST API: Introduce Autosaves controller and endpoint.
* Adds `WP_REST_Autosaves_Controller` which extends `WP_REST_Revisions_Controller`.
* Autosaves endpoint is registered for all post types except `attachment` because even post types without revisions enabled are expected to autosave.
* Because setting the `DOING_AUTOSAVE` constant pollutes the test suite, autosaves tests are run last. We may want to improve upon this later.

Props adamsilverstein, aduth, azaozz, danielbachhuber, rmccue.
Fixes #43316.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 13:49:41 +00:00
danielbachhuber
53002c68c4 REST API: Use a truly impossibly high number in User Controller tests.
The `100` number could be valid in certain test run configurations. The `REST_TESTS_IMPOSSIBLY_HIGH_NUMBER` constant is impossibly high for this very reason.

Fixes #45128.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 11:57:39 +00:00
danielbachhuber
7edc3e2b98 REST API: Ensure rest_url() consistently has leading slash.
`rest_url()` inconsistent addes slashes to the passed path depending on whether the site has pretty permalinks enabled. Apart from being inconsistent, this also caused the unit tests to fail when pretty permalinks are enabled.

Props frank-klein.
Merges [42250] to the 5.0 branch.
Partially reverts [43720].
Fixes #42452. See #41451, #45017.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 11:14:39 +00:00
mcsf
326cd6af15 Deactivate Gutenberg plugin on update to 5.0.
Fixes #45123.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43594 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 10:51:39 +00:00
Gary Pendergast
93343de1bd i18n: Remove some translation domains accidentally included in [43762].
See #45110.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 09:12:38 +00:00
Gary Pendergast
2ccaeedbda REST API: Introduce the rest_preload_api_request() function.
This function helps perform multiple REST API requests, for the purpose of preloading data into a page.

See #45110.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 08:57:40 +00:00
Gary Pendergast
de323bc14c Block Editor: Add helper functions for displaying the editor.
`use_block_editor_for_post()` and `use_block_editor_for_post_type()` determine if the block editor should be loaded.

`get_block_categories()` and `get_block_editor_server_block_settings()` provide data be included while the block editor is loading.

See #45110.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 08:44:41 +00:00
Gary Pendergast
99d061b53c General: Extract the code editor settings from wp_enqueue_code_editor().
They're now returned by a new function, `wp_get_code_editor_settings()`, so they can be reused by the block editor.

See #45127.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 06:45:39 +00:00
Gary Pendergast
158cbdbf03 Build Tools: Copy package JavaScript and CSS into wp-includes.
- `grunt webpack:dev` now copies packages JS into `/src/wp-includes/js/dist`, and CSS into `/src/wp-includes/css/dist`.
- `grunt webpack:prod` does the same, but into `/build` instead of `/src`.
- `grunt build` now runs the `webpack:prod` task.

Props atimmer, pento.
Fixes #45119.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 06:06:46 +00:00
Gary Pendergast
98eb507bbe i18n: Add the wp_get_jed_locale_data() function.
This function formats locale information to be used by Jed.

Props desrosj.
See #45111.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43588 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 05:52:25 +00:00
Gary Pendergast
dbb5cd9960 Classic Editor: Disable the wpautop TinyMCE plugin on block posts.
As the block editor adds its own `<p>` tags, disabling the wpautop stops the classic editor from removing them.

See #45113.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-19 01:43:26 +00:00
danielbachhuber
a5bd8cb64c REST API: generate a valid fallback URI in wp.api.utils.getRootURL.
When window.location.origin isn't set, correctly insert two slashes between the protocol and host when constructing the fallback URL.

Props abdullahramzan.
Merges [43566] into the 5.0 branch.
Fixes #44764.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 20:49:25 +00:00
danielbachhuber
699bf044ef REST API: Correct HTTP status code in error for requests to create a duplicate term.
The 409 error code is intended for situations where it is expected that the user will resolve the conflict and resubmit the same request. We use 400 error codes for other routes when a duplicate request is made. The 400 status code tells the user they need to modify their request for it to be successful.

Props shooper.
Merges [42354] to the 5.0 branch.
Fixes #42781. See #41370.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 20:32:27 +00:00
danielbachhuber
8023795f7d REST API: Fix permissions error message in post statuses controller.
The permissions error message when a request tries to fetch post statuses unauthenticated is incorrect. It was a copy/paste from elsewhere, as indicated by the use of "in this post type" where this is no post type referenced.

Props schlessera.
Merges [42356] to the 5.0 branch.
Fixes #42303.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 20:26:25 +00:00
atimmer
72c9037248 Script loading: Fix a PHP error introduced in [43753].
See #45065.
Props swissspidy.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 13:27:26 +00:00
atimmer
ab6b171b1d Script loading: Fix regression after [43738].
After [43738], TinyMCE would be loaded earlier than before, which
makes filters run at a different time relative to the loading of
TinyMCE. Fix this by calling `wp_print_scripts` at the location where
TinyMCE would previously be inserted as a `<script>` tag in the page.

Props azaozz, omarreiss.
Fixes #45065.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43582 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 13:22:26 +00:00
Gary Pendergast
798c2581b1 Blocks: Parse blocks when displaying posts.
Posts containing blocks are now correctly handled when displaying on the front end, including dynamic blocks and nested blocks.

See #45109.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 11:54:26 +00:00
Gary Pendergast
f7d01b4e70 Blocks: Introduce the block parser.
The `WP_Block_Parser` class, and the accompanying `parse_blocks()` helper function, can be used to parse an array of blocks out of a content string.

`WP_Block_Parser` is copied from the `@wordpress/block-serialization-default-parser` package. To ensure it stays in sync with the JavaScript parser, changes should be implemented in the package first, then the package version should be upgraded to include the changes.

See #45109.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 04:40:27 +00:00
Sergey Biryukov
591a09dea0 Media: Pass EXIF data to the wp_read_image_metadata filter.
Props desrosj.
Merges [42879] to the 5.0 branch.
Fixes #43624.
Built from https://develop.svn.wordpress.org/branches/5.0@43750


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 04:15:26 +00:00
Sergey Biryukov
b6e0d06fff Media: In wp_read_image_metadata(), rename $sourceImageType variable to $image_type to match coding standards.
Merges [42878] to the 5.0 branch.
See #43624.
Built from https://develop.svn.wordpress.org/branches/5.0@43749


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 04:14:25 +00:00
Sergey Biryukov
7a47da86e0 Build/Test Tools: Instruct Git and Subversion to ignore Composer's vendor directory.
Props netweb.
Merges [42405] to the 5.0 branch.
Fixes #42909.
Built from https://develop.svn.wordpress.org/branches/5.0@43748


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 04:13:25 +00:00
Sergey Biryukov
e3018db874 Build/Test Tools: Remove vendor file name entry from .gitignore.
Props netweb.
Merges [42733] to the 5.0 branch.
Fixes #43411.
Built from https://develop.svn.wordpress.org/branches/5.0@43747


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 04:09:25 +00:00
Sergey Biryukov
3deded1729 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 5.0 branch.
Fixes #44543.
Built from https://develop.svn.wordpress.org/branches/5.0@43746


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 03:42:27 +00:00
Sergey Biryukov
38235a183e Media: Remove checkered background for icons in Attachment Details.
Props BandonRandon.
Merges [42642] to the 5.0 branch.
Fixes #42535. See #41948.
Built from https://develop.svn.wordpress.org/branches/5.0@43745


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 03:11:26 +00:00
danielbachhuber
883d237689 Posts, Post Types: Add labels for post transformation messages.
Because the existing `post_updated_messages` filter can be modified dynamically based on post state, it's unreliable to use with REST API clients. Instead, these new labels give clients stateless equivalents.

Props earnjam.
Fixes #45101.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 02:04:26 +00:00
Gary Pendergast
28310289bd Blocks: Introduce register_block_type(), unregister_block_type(), and get_dynamic_blocks() functions.
These helper functions allow easy access to the global block registry.

See #45109.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 01:53:26 +00:00
Gary Pendergast
22840639e8 Blocks: Introduce WP_Block_Type and WP_Block_Type_Registry classes.
These are the foundational classes allowing blocks to be registered and used throughout WordPress.

This commit also includes the `has_block()` and `has_blocks()` functions, which are required for unit testing these classes.

Props adamsilverstein, danielbachhuber, desrosj.
See #45097, #45109.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-18 01:31:26 +00:00
danielbachhuber
e4b0ddbf4d REST API: Fix version number in _doing_it_wrong() call.
`_doing_it_wrong()`, indeed.

Props joehoyle.
See #39965.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43570 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 22:20:25 +00:00
K. Adam White
a943d902c1 REST API: Slash existing meta values when comparing with incoming meta upates.
When comparing the old and new values for a meta key being set, ensure both values are sanitized using the same logic so that equal values match.

props boonebgorges, dcavins, MattGeri, pilou69, TimothyBlynJacobs.
Fixes #42069.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 20:10:25 +00:00
danielbachhuber
a2d601024f REST API: Introduce controller for searching across post types.
Introduces a `WP_REST_Search_Controller` class which registers a `/wp/v2/search` endpoint. Search types are handled by extending `WP_REST_Search_Handler`. The default search type is `WP_REST_Post_Search_Handler` but can be filtered by plugins or a theme.

Props danielbachhuber, flixos90, pento, rmccue.
Fixes #39965.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43568 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 17:03:26 +00:00
atimmer
07ea394b44 Script loader: Adjust JS packages registration.
Adjusts the packages registration after [43723]:

* Combine the different registration functions into one
`wp_default_packages` function. To reach this goal move the prefix
logic into a function so it can be called from different locations.
Use a `static` variable there to prevent duplicate inclusion of
`version.php`.
* Call this function from the `wp_default_scripts` action by
registering it as a default filter.
* Combine some of the logic in `_WP_Editors::print_tinymce_scripts`
into `wp_register_tinymce_scripts`. The logic to force an uncompressed
TinyMCE script file stays in `_WP_Editors::force_uncompressed_tinymce`
because that logic is very specific to the classic editor.
* The script handle `wp-tinymce` is now a dependency of the `editor`
script handle. In combination with the previous item, this makes the
classic editor work.
* Adjust the syntax of the script paths to be more consistent with
other WordPress code.
* Always use `"production"` mode for the media files to prevent people
from inadvertently committing development files.

Props pento, omarreiss.
Fixes #45065.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 15:29:26 +00:00
danielbachhuber
fbd004bbbd REST API: Fire actions after items are completely updated/inserted.
The existing `rest_insert_*` actions are fired before meta and additional fields are updated. These new `rest_after_*` actions fire after all write operations have completed.

Props timothyblynjacobs.
Fixes #42864.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 11:20:26 +00:00
danielbachhuber
12b674fb3a REST API: Don't add fields to object when not included in ?_fields=.
In [43087], we improved REST API performance by only rendering the fields specified in the request. Similarly, any fields registered with `register_rest_field()` should only be rendered when included in `?_fields=`.

Props dlh.
Fixes #45099.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-17 02:41:27 +00:00
K. Adam White
9cafddd841 REST API: Add new class file and tests missed in [43734].
See #45016.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-16 22:50:26 +00:00
K. Adam White
81a4d0a10c REST API: Introduce themes endpoint to expose theme-supports values for the active theme.
In order to correctly render parts of its UI, the new editor needs to be aware of the active theme's post-formats and post-thumbnails support. This data is exposed by querying for the active theme on a new /wp/v2/themes endpoint for sufficiently privileged users.

props desrosj.
Fixes #45016.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-16 22:28:28 +00:00
Peter Wilson
f09938cd01 Formatting: Add new tests missed in [43732].
Completes merging [42770] to the 5.0 branch.
See #43187.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-16 04:42:27 +00:00
Peter Wilson
bf672769c2 Formatting: Add pre-save content filter to make target=_blank always secure.
Props notnownikki, iseulde, azaozz.
Merges [42770] to the 5.0 branch.
Fixes #43187.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-16 04:13:30 +00:00
Peter Wilson
f7ace6f1b2 KSES: Add selected ARIA attributes support.
Allow low-privileged users to use the ARIA attributes `aria-describedby`, `aria-details`, `aria-label`, `aria-labelledby` and `aria-hidden`.

Props mattheu, swissspidy, rianrietveld, afercia, GaryJ.
See #30421.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 23:44:26 +00:00
danielbachhuber
760b131bec Load: Disable PHP errors for JSON requests
Because WP REST API requests aren't identified until `parse_request`, it's impractical to reference the `REST_REQUEST` constant in `wp_debug_mode()`. Instead, it's more helpful to assume that a request wanting a JSON response probably doesn't want PHP errors breaking the response.

Props chrisl27, duanestorey, earnjam.
Fixes #44534.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43559 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 22:06:27 +00:00
Felix Arntz
0dde03e3f0 REST API: Move object type-specific metadata integrations from the wrapper functions to the low-level Meta API functions.
Object type-specific actions that should happen before or after modification of metadata have so far been part of the respective wrapper functions. By using action and filter hooks, this changeset ensures they are always executed, even when calling the lower-level Meta API functions directly, which the REST API does as a prime example.

Props flixos90, spacedmonkey.
Fixes #44467.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 11:46:25 +00:00
Gary Pendergast
392f33495f 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.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 05:35:25 +00:00
Peter Wilson
4b3d92a0db 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.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 05:22:25 +00:00
Aaron Jorbin
73f5d3d4d9 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.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-15 02:48:26 +00:00
Gary Pendergast
c738add83e Build/Test Tools: Remove an extra line incorrectly included in [43724].
See #44858.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:52:06 +00:00
Gary Pendergast
86d8caa61d 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.


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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:51:40 +00:00
atimmer
c8625c33ee 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.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43552 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:51:14 +00:00
Sergey Biryukov
9bc4e12e18 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.
Built from https://develop.svn.wordpress.org/branches/5.0@43722


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:50:49 +00:00
Sergey Biryukov
8d85630358 Build: Bump the version of node used on Travis to match package.json for 5.0.
See [43684].
See #45064.
Built from https://develop.svn.wordpress.org/branches/5.0@43721


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:50:23 +00:00
danielbachhuber
bab0d57578 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.

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


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-10-13 03:49:57 +00:00
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
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