Commit Graph

2984 Commits

Author SHA1 Message Date
Gary Pendergast f61cfa648c Embeds: Filter HTML response in oEmbed proxy controller.
Adapts the response from `WP_oEmbed_Controller::get_proxy_item()` so that the response is correctly filtered and embeds work properly in JavaSccript editors. Introduces new `get_oembed_response_data_for_url()` function for preparing internal oEmbed responses.

Merges [43810] from the 5.0 branch to trunk.

Props danielbachhuber, imath, swissspidy.
Fixes #45142.



git-svn-id: https://develop.svn.wordpress.org/trunk@44154 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 03:19:48 +00:00
Jonathan Desrosiers 88de9a1d7c Meta: Allow empty strings to be set by Custom Fields meta box.
Because the REST API allows meta keys to have empty values, the Custom Fields meta box should permit the same behavior.

Props charlestonsw, soulseekah, danielbachhuber.

Merges [43811] to trunk.

Fixes #43559.

git-svn-id: https://develop.svn.wordpress.org/trunk@44153 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 03:16:56 +00:00
Gary Pendergast c474d190e7 Bundled Themes: Make twentynineteen the default theme.
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.

Merges [43809,43954] from the 5.0 branch to trunk.

Fixes #45152.
Props jorbin, SergeyBiryukov, pento, mcsf.



git-svn-id: https://develop.svn.wordpress.org/trunk@44151 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 02:48:14 +00:00
Jeremy Felt 7702b535be REST API: Add endpoints for blocks.
`WP_REST_Block_Renderer_Controller` allows rendering of server-side rendered blocks, whilst `WP_REST_Blocks_Controller` allows retrieving of reusable blocks.

Merges [43805] and [43806] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, pento, Presskopp, swissspidy.
See #45065, #45098.


git-svn-id: https://develop.svn.wordpress.org/trunk@44150 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 02:34:28 +00:00
Jeremy Felt 6a84afa33c Blocks: Add the reusable block post type, `wp_block`.
Merges [43804] from the 5.0 branch to trunk.

See #45098.


git-svn-id: https://develop.svn.wordpress.org/trunk@44146 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 02:14:13 +00:00
Jeremy Felt 82b3fac279 Themes: Introduce responsive embeds support.
Responsive embeds is a way for a theme to opt in to WordPress dynamically scaling the width/height of an embed. When a theme supports responsive embeds, a `wp-embed-responsive` class is added to the `<body>` tag. This information is also presented through the REST API for clients to respect.

Merges [43790] and [43791] from the 5.0 branch to trunk.

Props desrosj, danielbachhuber, ocean90.
Fixes #45125.


git-svn-id: https://develop.svn.wordpress.org/trunk@44138 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 01:49:46 +00:00
Gary Pendergast 79486d7656 KSES: Allow `url()` to be used in inline CSS.
The cover image block uses the `url()` function in its inline CSS, to show the cover image. KSES didn't allow this, causing the block to not save correctly for Author and Contributor users. As KSES does already check each attribute name against an allowed list, we're able to add an extra check for certain attributes to be able to use the `url()` function, too.

Merges [43781] from the 5.0 branch to core.

Props peterwilsoncc, azaozz, pento, dd32.
Fixes #45067.



git-svn-id: https://develop.svn.wordpress.org/trunk@44136 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 01:40:50 +00:00
Jeremy Felt 2f9a63bf87 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.

Merges [43774] from the 5.0 branch to trunk.

See #45131.


git-svn-id: https://develop.svn.wordpress.org/trunk@44128 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 00:57:50 +00:00
Gary Pendergast 63d9540fd8 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.

Merges [43770] from the 5.0 branch to trunk.

Props danielbachhuber, birgire.
Fixes #43887.


git-svn-id: https://develop.svn.wordpress.org/trunk@44127 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-14 00:54:51 +00:00
Jonathan Desrosiers 225f191f32 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. 

Also, use a truly impossibly high number in User Controller tests. The number `100`, (or `7777` in `trunk`), could be valid in certain test run configurations. The `REST_TESTS_IMPOSSIBLY_HIGH_NUMBER` constant is impossibly high for this very reason.

Finally, Skip Autosaves controller test for multisite. There's a PHP 5.2 edge case where paths calculated differently, possibly caused by differing version of PHPUnit.

Props adamsilverstein, aduth, azaozz, danielbachhuber, rmccue, danielbachhuber.

Merges [43767], [43768], [43769] to trunk.

See #45132, #45131.
Fixes #45128, #43316.

git-svn-id: https://develop.svn.wordpress.org/trunk@44126 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 22:41:47 +00:00
Jonathan Desrosiers 08cc6047d1 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.

Props pento.

Merges [43763] to trunk.

See #45110.

git-svn-id: https://develop.svn.wordpress.org/trunk@44123 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 20:46:19 +00:00
Jonathan Desrosiers ab070e219b 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.

Props pento.

Merges [43762] to trunk.

See #45110.

git-svn-id: https://develop.svn.wordpress.org/trunk@44122 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 20:22:06 +00:00
Jonathan Desrosiers 93091fac36 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.

Props pento.

Merges [43752] to trunk.

See #45109.

git-svn-id: https://develop.svn.wordpress.org/trunk@44118 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 18:11:10 +00:00
Jonathan Desrosiers f8c9698722 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.

Props pento.

Merges [43751] to trunk.

See #45109.

git-svn-id: https://develop.svn.wordpress.org/trunk@44116 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 17:39:59 +00:00
Jonathan Desrosiers 8909554d2e 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, atimmer.

Merges [43738] into trunk.

Fixes #45065.

git-svn-id: https://develop.svn.wordpress.org/trunk@44115 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 17:26:09 +00:00
Jonathan Desrosiers c05b5d8b61 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, kadamwhite.

Merges [43740] to trunk.

Fixes #42069.

git-svn-id: https://develop.svn.wordpress.org/trunk@44113 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 16:29:57 +00:00
Gary Pendergast 738609ae9c Blocks: Introduce `register_block_type()`, `unregister_block_type()`, and `get_dynamic_blocks()` functions.
These helper functions allow easy access to the global block registry.

Merges [43743] from the 5.0 branch to trunk.

See #45109.


git-svn-id: https://develop.svn.wordpress.org/trunk@44109 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 09:53:10 +00:00
Gary Pendergast 9254ae4a72 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.

Merges [43742] from the 5.0 branch to trunk.

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


git-svn-id: https://develop.svn.wordpress.org/trunk@44108 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 09:43:29 +00:00
Gary Pendergast 5c9c54239d 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.

Merges [43739,43741] from the 5.0 branch to trunk.

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



git-svn-id: https://develop.svn.wordpress.org/trunk@44107 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-13 09:37:05 +00:00
Jonathan Desrosiers 8c85f2dfec 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, danielbachhuber.

Merges [43736] to trunk.

Fixes #45099.

git-svn-id: https://develop.svn.wordpress.org/trunk@43986 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 20:50:22 +00:00
Jeremy Felt 140a95cf08 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.

Merges [43734], [43735] to trunk.

props desrosj.
Fixes #45016.


git-svn-id: https://develop.svn.wordpress.org/trunk@43985 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 03:32:21 +00:00
Jeremy Felt 2ad4d85ed5 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.

Merges [43729] to trunk.

Props flixos90, spacedmonkey.
Fixes #44467.


git-svn-id: https://develop.svn.wordpress.org/trunk@43982 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 03:02:00 +00:00
Jeremy Felt 1c9f359857 KSES: Allow HTML data-* attributes.
Add global support for HTML attributes prefixed `data-` for authors and contributors, as required by the new editor.

Merges [43727] to trunk.

Props azaozz, peterwilsoncc.
Fixes #33121.


git-svn-id: https://develop.svn.wordpress.org/trunk@43981 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 02:38:14 +00:00
Jeremy Felt 894a8e02d2 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.

Merges [43720] to trunk.

Props danielbachhuber, rahulsprajapati.
Fixes #45017.


git-svn-id: https://develop.svn.wordpress.org/trunk@43980 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-12 02:11:22 +00:00
Jonathan Desrosiers c0e80b028a 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.

Moves [43694] from the 5.0 branch to trunk.

Fixes #43701.

git-svn-id: https://develop.svn.wordpress.org/trunk@43979 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-11 22:29:36 +00:00
Aaron Jorbin 7f544b912b 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.

Merges [43682] to trunk.

Props timothyblynjacobs.

Fixes #45014.


git-svn-id: https://develop.svn.wordpress.org/trunk@43974 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-11 04:12:56 +00:00
Aaron Jorbin 891394af73 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.

Merges [43681] to trunk.

Props TimothyBlynJacobs, danielbachhuber.
Fixes #44750.


git-svn-id: https://develop.svn.wordpress.org/trunk@43973 602fd350-edb4-49c9-b593-d223f7449a82
2018-12-11 04:00:37 +00:00
Sergey Biryukov e1ff4cd7cd General: Introduce `wp_unique_id()`, a PHP implementation of Underscore's `uniqueId` method.
A static variable contains an integer that is incremented with each call. This number is returned with the optional prefix.
As such the returned value is not universally unique, but it is unique across the life of the PHP process.

Props westonruter, dlh.
See #44883.

git-svn-id: https://develop.svn.wordpress.org/trunk@43658 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 20:56:30 +00:00
Felix Arntz c12a0cf4f3 Multisite: Fix coding standard errors after [43654].
See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43655 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 15:22:01 +00:00
Felix Arntz 1795dbe25a Multisite: Introduce a site initialization and uninitialization API.
This changeset makes the new CRUD API for sites introduced in [43548] usable for real-world sites. A new function `wp_initialize_site()`, which takes care of creating a site's database tables and populating them with initial values, is hooked into the site insertion process that is initiated when calling `wp_insert_site()`. Similarly, a new function `wp_uninitialize_site()`, which takes care of dropping a site's database tables, is hooked into the site deletion process that is initiated when calling `wp_delete_site()`.

A new function `wp_is_site_initialized()` completes the API, allowing to check whether a site is initialized. Since this function always makes a database request in its default behavior, it should be called with caution. Plugins that would like to use site initialization in special ways can leverage a `pre_wp_is_site_initialized` filter to alter that default behavior.

The separate handling of the site's row in the `wp_blogs` database table and the actual site setup allows for more flexibility in controlling whether or how a site's data is set up. For example, a unit test that only checks data from the site's database table row can unhook the site initialization process to improve performance. At the same time, developers consuming the new sites API only need to know about the CRUD functions, since the initialization and uninitialization processes happen internally.

With this changeset, the foundation for a sites REST API endpoint is fully available. The previously recommended functions `wpmu_create_blog()` and `wpmu_delete_blog()` now call the new respective function internally. Further follow-up work to this includes replacing calls to `wpmu_create_blog()` with `wp_insert_site()`, `update_blog_details()` with `wp_update_site()` and `wpmu_delete_blog()` with `wp_delete_blog()` throughout the codebase.

As a side-effect of this work, the `wpmu_new_blog`, `delete_blog`, and `deleted_blog` actions and the `install_blog()` function have been deprecated.

Fixes #41333. See #40364.


git-svn-id: https://develop.svn.wordpress.org/trunk@43654 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-24 15:08:32 +00:00
Aaron Jorbin 6604782cd9 General: PHP7.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.
Fixes #44543.



git-svn-id: https://develop.svn.wordpress.org/trunk@43653 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-23 22:49:02 +00:00
SergeyBiryukov fb2699f28d Tests: Add missing `public` access modifier to `Tests_REST_Server` methods.
Props andizer.
Fixes #44939.

git-svn-id: https://develop.svn.wordpress.org/trunk@43652 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-23 15:45:02 +00:00
Sergey Biryukov 2724e2d0fe Tests: Restore `restapi` group on `WP_Test_REST_Revisions_Controller`.
See #40510.

git-svn-id: https://develop.svn.wordpress.org/trunk@43647 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-18 03:44:57 +00:00
Felix Arntz ffa16fa771 Upgrade/Install: Properly exclude the `admin/includesSchema.php` tests file for the `WordPress.DB.PreparedSQL.NotPrepared` sniff.
The way this was implemented in [43630] caused the file to be excluded for all sniffs, since PHPCS does not support file-wide ignores of a specific sniff at this point.

Props jrf.
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@43641 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-14 07:54:53 +00:00
Ian Dunn 7d22ba1961 Privacy: Add test for `wp_privacy_export_expiration` filter.
Props desrosj.
See #44233.


git-svn-id: https://develop.svn.wordpress.org/trunk@43640 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-13 17:25:31 +00:00
K. Adam White e29d895ffd REST API: Pass correct ID to `meta->update_value` to permit setting term meta during term creation.
Props joehoyle.
Fixes #44834.



git-svn-id: https://develop.svn.wordpress.org/trunk@43636 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-12 23:55:47 +00:00
Adam Silverstein fd5ba80c5c Media: Improve display and accessibility of meta data in detail view.
* Add a `human_readable_duration` function including tests.
* Add 'pixels' after image width/height.
* Add screen reader text for durations.

Props Presskopp, kiranpotphode, milindmore22, stormrockwell, afercia.
Fixes #39667. 



git-svn-id: https://develop.svn.wordpress.org/trunk@43633 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-08 04:19:40 +00:00
Felix Arntz b33420db6c Upgrade/Install: Fix coding standard errors after [43629].
See #44896.


git-svn-id: https://develop.svn.wordpress.org/trunk@43630 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 12:49:29 +00:00
Felix Arntz 46e5c6c91b Upgrade/Install: Introduce `populate_site_meta()`.
Fixes #44896. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43629 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 11:01:36 +00:00
flixos90 88b725e1cb Upgrade/Install: Introduce `populate_network_meta()`, moving logic out of `populate_network()`.
Fixes #44895. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43628 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 10:44:02 +00:00
Felix Arntz f1e1b6299e Upgrade/Install: Add support for an optional `$options` parameter to `populate_options()`.
Fixes #44893. See #41333.


git-svn-id: https://develop.svn.wordpress.org/trunk@43627 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-05 09:38:04 +00:00
Sergey Biryukov 04516c1299 Taxonomy: Make sure `wp_list_categories()` correctly outputs term name of `0`.
Props joyously, SergeyBiryukov.
Fixes #44872.

git-svn-id: https://develop.svn.wordpress.org/trunk@43605 602fd350-edb4-49c9-b593-d223f7449a82
2018-09-02 22:08:05 +00:00
Sergey Biryukov f1862cd98c Date/Time: Make sure `current_time()` always calculates the offset from GMT/UTC.
Previously, UTC context was implied, but could be unreliable due to being affected by plugins.

Props Rarst, rahulsprajapati, marco.marsala.
Fixes #37440.

git-svn-id: https://develop.svn.wordpress.org/trunk@43594 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 12:12:55 +00:00
Sergey Biryukov 9364b6ed87 Date/Time: Make `get_the_date()` call `get_post_time()` for consistency with `get_the_time()`.
Props Rarst.
Fixes #44490.

git-svn-id: https://develop.svn.wordpress.org/trunk@43591 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-30 08:49:40 +00:00
Felix Arntz aa5b179247 REST API: Fix failing tests after [43584] and [43585].
See #40510.


git-svn-id: https://develop.svn.wordpress.org/trunk@43586 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-28 13:04:07 +00:00
Felix Arntz 65cadaab62 REST API: Fix failing tests after [43584].
See #40510.


git-svn-id: https://develop.svn.wordpress.org/trunk@43585 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-28 12:43:50 +00:00
Felix Arntz e5d6ddfeee 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.
Fixes #40510.


git-svn-id: https://develop.svn.wordpress.org/trunk@43584 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-28 12:22:48 +00:00
Gary Pendergast 63acd3caaa Tests: Revert `wp-api-generated.js` change added in [43571].
The fixtures file was accidentally included in [43571], but that caused other tests to fail.

See #39122.



git-svn-id: https://develop.svn.wordpress.org/trunk@43572 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 04:11:48 +00:00
Gary Pendergast a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.



git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-17 01:50:26 +00:00
Sergey Biryukov c5d013bf95 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.
Fixes #43985.

git-svn-id: https://develop.svn.wordpress.org/trunk@43568 602fd350-edb4-49c9-b593-d223f7449a82
2018-08-13 16:31:31 +00:00