Commit Graph

35836 Commits

Author SHA1 Message Date
Weston Ruter
1a3e930383 Customize: Combine Ajax requests for initial load of available nav menu items into a single request.
When there are many post types registered, prevent Ajax requests from piling up and slamming WordPress with concurrent requests.

Props curdin, westonruter.
Fixes #36697.

Built from https://develop.svn.wordpress.org/trunk@39137


git-svn-id: http://core.svn.wordpress.org/trunk@39077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:57 +00:00
Weston Ruter
f4c3b8352e Customize: Use button with svg as click target instead of :before content, improving clickability of edit shortcuts in Firefox.
Props sirbrillig, celloexpressions, delawski.
See #38532.

Built from https://develop.svn.wordpress.org/trunk@39136


git-svn-id: http://core.svn.wordpress.org/trunk@39076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:16:26 +00:00
David A. Kennedy
495b2d835f Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer
This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.

Built from https://develop.svn.wordpress.org/trunk@39135


git-svn-id: http://core.svn.wordpress.org/trunk@39075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:55 +00:00
Dominik Schilling
abada1fbdc I18N: In get_user_locale() ensure that $user_id isn't a falsy value before calling get_user_by().
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39134


git-svn-id: http://core.svn.wordpress.org/trunk@39074 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:15:26 +00:00
Weston Ruter
6ccb29bee0 Customize: No-op edit_post_link() when in customizer preview.
Edit links can be restored in plugins by removing the `__return_empty_string` function from the `get_edit_post_link` filter at the `customize_preview_init` action.

Fixes #38648.

Built from https://develop.svn.wordpress.org/trunk@39133


git-svn-id: http://core.svn.wordpress.org/trunk@39073 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:56 +00:00
Weston Ruter
e4b4f3efe3 Customize: For toggling visibility of the controls pane, rename "Collapse (Sidebar)" to "Hide Controls" and "Expand Sidebar" to "Expand Controls".
Fixes #38647.

Built from https://develop.svn.wordpress.org/trunk@39132


git-svn-id: http://core.svn.wordpress.org/trunk@39072 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:14:27 +00:00
Weston Ruter
726cd04bac Customize: Let edit shortcuts be persistently visible when controls pane is expanded, hidden when collapsed, and always visible in mobile preview. Remove initial flash of edit shortcuts.
Props westonruter, sirbrillig.
Fixes #27403.

Built from https://develop.svn.wordpress.org/trunk@39131


git-svn-id: http://core.svn.wordpress.org/trunk@39071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:57 +00:00
Dominik Schilling
727e859b3e Load: Remove unused global imports in wp_load_translations_early().
See #38535.
Built from https://develop.svn.wordpress.org/trunk@39130


git-svn-id: http://core.svn.wordpress.org/trunk@39070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:13:27 +00:00
David A. Kennedy
0a3d034962 Twenty Seventeen: Correct issues with hidden overflow and height on site header
In -r39124, some additional issues were introduced:

* The 'overflow: hidden' on the `.site-header;` was added to prevent a side-scrolling issue, but it ended up cutting off the menu. It looks like the cause of the side-scroll was related to how the scroll down icon was rotated, so it's addressed by rotating the icon and not the `<a>`.
* Also, `min-height` doesn't play well with `display: table;` in Firefox. So it's addressed with just `height`.

Props laurelfulford, sami.keijonen.

See #38543.

Built from https://develop.svn.wordpress.org/trunk@39129


git-svn-id: http://core.svn.wordpress.org/trunk@39069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:57 +00:00
Joe McGill
50b2c6cf2c Customize: Remove Vimeo reference from description for external header videos.
Vimeo's API requires a Pro account to display videos as background videos
(i.e., without player controls), thus we shouldn't support Vimeo
URLs by default in custom header videos. This removes the reference of Vimeo
from the control description in the customizer.

Fixes #38544.
Built from https://develop.svn.wordpress.org/trunk@39128


git-svn-id: http://core.svn.wordpress.org/trunk@39068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:12:28 +00:00
Pascal Birchler
b1ee6c64d9 I18N: Use the user's locale when loading text domains in the admin.
Leverages `get_user_locale()` in `load_*_textdomain()` and `_load_textdomain_just_in_time()` to always load translations in the user's language when in the admin.

This re-introduces [39069], but now with additional tests and a `function_exists( 'wp_get_current_user' )` check in `get_user_locale()` in case it gets used early.

Props swissspidy, ocean90.
Fixes #38485.
Built from https://develop.svn.wordpress.org/trunk@39127


git-svn-id: http://core.svn.wordpress.org/trunk@39067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:59 +00:00
Rachel Baker
5564716a07 REST API: Modify the structure of our DELETE responses to be more explicit.
Add the `deleted` property to the root of the Response object to communicate if the delete action was successful. Move the state of the resource prior to the delete request under a new `previous` property.  As a result DELETE responses are now structured like so:
 `{ deleted: true, previous: { ... } }`

Also includes helpful information to DELETE requests for resources that are not trashable.

Props timmydcrawford, rmccue, jnylen0.
Fixes #38494.
Built from https://develop.svn.wordpress.org/trunk@39126


git-svn-id: http://core.svn.wordpress.org/trunk@39066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:29 +00:00
Pascal Birchler
557496ce83 I18N: Move load_textdomain() tests to separate file.
See #38485.
Built from https://develop.svn.wordpress.org/trunk@39125


git-svn-id: http://core.svn.wordpress.org/trunk@39065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:11:00 +00:00
David A. Kennedy
6c82930a5d Twenty Seventeen: Fix site name and description appearing off screen in some browsers
* Occurred in Firefox and IE 11.
* Removes Flexbox in favor of more well-supported `display: table; ` layout technique.
* Maintains consistent layout on smaller screens.

Props laurelfulford.

Fixes #38543.

Built from https://develop.svn.wordpress.org/trunk@39124


git-svn-id: http://core.svn.wordpress.org/trunk@39064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:31 +00:00
Joe McGill
8fa49e77bd Themes: Improve support for placeholders in default headers.
When themes register default headers, they can use sprintf style placeholder
strings in place of the template directory URI, which WordPress transforms
in several places by running the value of
`get_theme_support( 'custom-header', 'default-image' )` through `sprintf()`.

This fixes a few places where WordPress skipped the `sprintf()` step and
referenced the `get_theme_support()` value directly.

Props bradyvercher for initial patch.
See #38557.
Built from https://develop.svn.wordpress.org/trunk@39123


git-svn-id: http://core.svn.wordpress.org/trunk@39063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:10:01 +00:00
Dominik Schilling
89cab4e197 I18N: Show "Settings saved." in the correct language after switching the site language.
This simplifies the logic by comparing `get_user_locale()` before and after an settings update.

Props swissspidy, ocean90.
See #29783, #29281.
Fixes #38482.
Built from https://develop.svn.wordpress.org/trunk@39122


git-svn-id: http://core.svn.wordpress.org/trunk@39062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:31 +00:00
Joe McGill
60db5df85f Themes: Improve reliability of URL used in get_header_image_tag().
`get_header_image_tag()` relies on the data returned by `get_custom_header()`
to build the attributes for the header `<img>` element. However,
`get_custom_header()` relies on data from the `header_image_data` theme
mod rather than the `header_image` theme mod that `get_header_image()` uses.
This can create inconsistencies when no header image is set, but a theme
supports a default header image.

This fixes the issue by making `get_custom_image_tag()` rely on the URL
returned by `get_header_image()` instead.

Props bradyvercher.
Fixes #38633.
Built from https://develop.svn.wordpress.org/trunk@39121


git-svn-id: http://core.svn.wordpress.org/trunk@39061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:09:02 +00:00
Weston Ruter
ea5f4179a7 Customize: Prevent collapsing expanded panel/section/control when Esc is pressed on another closable UI element.
Prevents collapsing constructs when hitting `Esc` on a TinyMCE toolbar, lightbox, or expanded color picker.

See #22237.
Fixes #38091.

Built from https://develop.svn.wordpress.org/trunk@39120


git-svn-id: http://core.svn.wordpress.org/trunk@39060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-04 17:08:33 +00:00
Aaron Jorbin
32be6f7bb7 Bump grunt-contrib-uglify from 1.0.1 to 2.0.0
Sets `screwIE8` to false as it is now enabled by default

Files Changed:
build/wp-admin/js/customize-nav-menus.min.js
build/wp-admin/js/customize-widgets.min.js
build/wp-includes/js/customize-loader.min.js

Changelog:
2016-07-19   v2.0.0   Update uglify-js to v2.7.0. screwIE8 is enabled by default.
2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix beautify when passed as an object. Fix docs about report values.

See #38199.


Built from https://develop.svn.wordpress.org/trunk@39117


git-svn-id: http://core.svn.wordpress.org/trunk@39059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:40:34 +00:00
Aaron Jorbin
21ddb65fcc Bump grunt-contrib-cssmin from v1.0.0 to v1.0.2
Changelog:
2016-08-31   v1.0.2   Fix issues for node 6.
2016-03-16   v1.0.1   Downgrade maxmin to support Node.js 0.10.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39116


git-svn-id: http://core.svn.wordpress.org/trunk@39058 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:32:32 +00:00
Aaron Jorbin
c8bf15c41c Bump grunt-contrib-compress from 1.1.0 to 1.3.0
Changelog:
2016-05-24   v1.3.0   Update to Archiver 1.0. Fix node 6 support.
2016-03-24   v1.2.0   Dependency update.

See #38199

Built from https://develop.svn.wordpress.org/trunk@39115


git-svn-id: http://core.svn.wordpress.org/trunk@39057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:28:32 +00:00
Aaron Jorbin
8ed617ad9f Bump autoprefixer from 6.5.0 to 6.5.1
Changelog
Fix selectors with :-- prefix support.

See #38199.

M    package.json

Built from https://develop.svn.wordpress.org/trunk@39114


git-svn-id: http://core.svn.wordpress.org/trunk@39056 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:18:36 +00:00
Aaron Jorbin
ffdac5599b Bump grunt-contrib-qunit from 1.1.0 to 1.2.0
Changlog:
2016-04-14   v1.2.0   Add support for filtering running modules using command line (--modules) Removed 'grunt.warn' output from error.onError handler, onus now on end user binding to event. Update docs.

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39113


git-svn-id: http://core.svn.wordpress.org/trunk@39055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:14:44 +00:00
Weston Ruter
985a1f6a97 Customize: Prevent syncing unmodified settings from controls into preview to guard against triggering an infinite reload due to selective refresh fallback behavior.
If a value is sanitized in PHP and differs from the JS value in the pane, a `change` event for the setting is triggered upon refresh. This should be avoided since the value just came from the server as being sanitized. This also fixes periodic issue where selective refresh happens immediately after a full refresh.

Fixes #37032.

Built from https://develop.svn.wordpress.org/trunk@39112


git-svn-id: http://core.svn.wordpress.org/trunk@39054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 05:07:32 +00:00
Ryan McCue
721cf281a3 REST API: Only provide JSON error code on PHP 5.3+.
json_last_error() was only added to PHP 5.3.0, so we can't provide the information for older versions.

See #38547.

Built from https://develop.svn.wordpress.org/trunk@39111


git-svn-id: http://core.svn.wordpress.org/trunk@39053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:57:30 +00:00
Aaron Jorbin
63ba4592e1 Bump grunt-sass from 1.1.0 to 1.2.1
diff: https://github.com/sindresorhus/grunt-sass/compare/v1.1.0...v1.2.1

See #38199.

Built from https://develop.svn.wordpress.org/trunk@39110


git-svn-id: http://core.svn.wordpress.org/trunk@39052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:55:52 +00:00
Joe Hoyle
6b08485cfa REST API: Return error when JSON decoding fails.
If you send a request to the REST API with invalid JSON in body than it will now return a error. This assists developers if they accidentally send invalid JSON and wonder why their data appears to be ignored.

Props rmccue.
Fixes #38547.

Built from https://develop.svn.wordpress.org/trunk@39109


git-svn-id: http://core.svn.wordpress.org/trunk@39051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 04:05:36 +00:00
Rachel Baker
8c9f4f812a REST API: Return a WP_Error when a user does not have permission to create or update a post with the provided terms.
Add the 'assign_term' check for post create and update.

Props boonebgorges, johnbillion.
Fixes #38505.
Built from https://develop.svn.wordpress.org/trunk@39108


git-svn-id: http://core.svn.wordpress.org/trunk@39050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 03:16:30 +00:00
Joe McGill
37318fe73f Media: Sanity check array value in wp_prepare_attachment_for_js().
This adds a sanity check to the return value of the `image_downsize` filter
in `wp_prepare_attachment_for_js()` to avoid undefined offest notices.

Props justinbusa for initial patch.
Fixes 34437.
Built from https://develop.svn.wordpress.org/trunk@39107


git-svn-id: http://core.svn.wordpress.org/trunk@39049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:23:29 +00:00
Joe Hoyle
d544c6ddd0 REST API: Switch to stable version of JSON Schema.
Props danielbachhuber.
Fixes #38635.

Built from https://develop.svn.wordpress.org/trunk@39106


git-svn-id: http://core.svn.wordpress.org/trunk@39048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:22:29 +00:00
Rachel Baker
dcb12c35cf REST API: Clean-up our validation callbacks and add missing array items properties in our endpoint schemas.
Props joehoyle, jnylen0.
Fixes #38617.
Built from https://develop.svn.wordpress.org/trunk@39105


git-svn-id: http://core.svn.wordpress.org/trunk@39047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 02:18:29 +00:00
Joe Hoyle
901c4ed17a REST API: Support querying for multiple post statuses.
Multiple post statuses can be specified by the usual CSV or array-propper format.

Props jnylen0, kadamwhite, websupporter.
Fixes #38420.

Built from https://develop.svn.wordpress.org/trunk@39104


git-svn-id: http://core.svn.wordpress.org/trunk@39046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:46:29 +00:00
Rachel Baker
676ae9fc2b REST API: Use the items attribute for the taxonomies types schema property for proper sanitization/validation.
Props danielbachhuber, joehoyle.
Fixes #38631.
Built from https://develop.svn.wordpress.org/trunk@39103


git-svn-id: http://core.svn.wordpress.org/trunk@39045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:26:28 +00:00
Joe McGill
89a70eb859 Themes: Remove jQuery dependency from wp-custom-header.js.
In [38985], we used jQuery to trigger a custom event once a video
handler has completed so themes, like Twenty Fourteen, can execute
their own adjustments after the header video has loaded.

This replaces the jQuery `trigger()` method with a native event and
updates Twenty Fourteen accordingly.

Props adamsilverstein, joemcgill.
Fixes #38550.
Built from https://develop.svn.wordpress.org/trunk@39102


git-svn-id: http://core.svn.wordpress.org/trunk@39044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:21:28 +00:00
Rachel Baker
94ab2f9b16 REST API: Return an error when the length of a comment field is too long.
Introduces `wp_check_comment_data_max_lengths()` which allows both the REST API comments endpoints and `wp_handle_comment_submission()` to check the length of the comment content, author name, author url, and author email fields against their respective database columns.

Props rachelbaker, mangeshp, salcode, pento.
Fixes #38477.
Built from https://develop.svn.wordpress.org/trunk@39101


git-svn-id: http://core.svn.wordpress.org/trunk@39043 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 01:12:31 +00:00
Weston Ruter
c0b41d8fee Customize: Prevent PHP warning in applying widget starter content on fresh installs.
Fixes PHP warning triggered by calling `max()` on `$widget_numbers` when there are no widget instances of the type yet. Also makes sure that widget instances start at 2 instead of 1.

See #38114.

Built from https://develop.svn.wordpress.org/trunk@39100


git-svn-id: http://core.svn.wordpress.org/trunk@39042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-03 00:00:32 +00:00
Pascal Birchler
ceeb8ddb46 Plugins: Improve Ajax search of installed plugins.
Removes the highlight from the current filter when performing an Ajax search and adds it back when clearing the search input.

Fixes #37657.
Built from https://develop.svn.wordpress.org/trunk@39099


git-svn-id: http://core.svn.wordpress.org/trunk@39041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:47:30 +00:00
Helen Hou-Sandí
6485e5e3cf Menus: Use a label of "Display location" for individual nav menu settings.
While "Menu/Theme locations" was descriptive of what the choices listed were, in the context of editing an individual nav menu it is more descriptive to use a setting label that tells you what it is you are affecting for that nav menu, which is where it will be displayed. Technically multiple locations can be chosen, but in practice that appears to be rare enough that we can avoid an awkward "location(s)" type string.

props Fencer04 for the initial patch.
fixes #38525.

Built from https://develop.svn.wordpress.org/trunk@39098


git-svn-id: http://core.svn.wordpress.org/trunk@39040 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 22:11:31 +00:00
Joe Hoyle
5666292dda REST API: Include taxonomies as an attribute of post types.
Add the taxonomies for a post type to the `/wp/v2/types` endpoint, so clients know which taxonomies are available for which post types.

Props danielbachhuber.
Fixes #38438, #38631.

Built from https://develop.svn.wordpress.org/trunk@39097


git-svn-id: http://core.svn.wordpress.org/trunk@39039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:51:30 +00:00
Joe Hoyle
37858faf96 REST API: Add en_US to the locales enum.
Props ocean90.
Fixes #38528. 

Built from https://develop.svn.wordpress.org/trunk@39096


git-svn-id: http://core.svn.wordpress.org/trunk@39038 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 21:21:32 +00:00
Dominik Schilling
9bc3830845 Query: Add tests for WP_Query::is_single() and get_body_class() with attachments.
See [39052]
See #38225.
Built from https://develop.svn.wordpress.org/trunk@39095


git-svn-id: http://core.svn.wordpress.org/trunk@39037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:23:28 +00:00
Tammie Lister
40dc499cda Twenty Seventeen: Unifies the labels for front page sections
Front page sesctions # Content were labelled in Customizer Theme Options but the preview called it Panel # placeholder. This unifies that.

Props Clorith, ahortin, celloexpressions, davidakennedy
Fixes #38567


Built from https://develop.svn.wordpress.org/trunk@39094


git-svn-id: http://core.svn.wordpress.org/trunk@39036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 19:09:32 +00:00
Ryan McCue
34cf5d8934 REST API: Allow querying for multiple slug values.
Props jnylen0, rachelbaker.
Fixes #38579.

Built from https://develop.svn.wordpress.org/trunk@39093


git-svn-id: http://core.svn.wordpress.org/trunk@39035 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 07:14:29 +00:00
Ryan McCue
624def0ec3 REST API: Add update and delete endpoints to /users/me
Now that /users/me is a standalone resource, it should have all the standard endpoints for a resource.

Props pento.
Fixes #38521 (hopefully).

Built from https://develop.svn.wordpress.org/trunk@39092


git-svn-id: http://core.svn.wordpress.org/trunk@39034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:53:32 +00:00
Ryan McCue
3fef086ede REST API: Set default sanitize callback if type is set.
Props joehoyle, ChopinBach, jnylen0.
Fixes #38593.

Built from https://develop.svn.wordpress.org/trunk@39091


git-svn-id: http://core.svn.wordpress.org/trunk@39033 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:28:29 +00:00
Ryan McCue
862724274e REST API: Add locale to user resource.
Props ocean90, joehoyle.
Fixes #38528.

Built from https://develop.svn.wordpress.org/trunk@39090


git-svn-id: http://core.svn.wordpress.org/trunk@39032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:24:29 +00:00
Ryan McCue
a911bf7e2c REST API: Avoid default sanitization for polymorphic params.
Some parameters (`title`, `content`, etc) are objects in the output, but allow objects or strings to be sent in updates for a more ergonomic interface. This is pretty weird behaviour, so the default sanitisation doesn't handle this. We instead handle this ourselves in the preparation.

Props joehoyle, rachelbaker.
Fixes #38529.

Built from https://develop.svn.wordpress.org/trunk@39089


git-svn-id: http://core.svn.wordpress.org/trunk@39031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 06:02:29 +00:00
Gary Pendergast
6f13b8291d Roles: Fix a PHP error introduced in [39082].
The now deprecated `WP_Roles::reinit()` method was trying to call `__deprecated_function()`, instead of `_deprecated_function()`.

See 23016.


Built from https://develop.svn.wordpress.org/trunk@39088


git-svn-id: http://core.svn.wordpress.org/trunk@39030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:55:30 +00:00
Ryan McCue
d7bdd72510 REST API: Change method of merging parameters.
`array_merge()` incorrectly reindexes numeric parameters, causing things like `{"123": true}` to be "dropped".

Props sswells, joehoyle.
Fixes #38306.

Built from https://develop.svn.wordpress.org/trunk@39087


git-svn-id: http://core.svn.wordpress.org/trunk@39029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 05:53:31 +00:00
Helen Hou-Sandí
dab566d973 Mail: Set a better error code when triggering wp_mail_failed.
This error code is now... wait for it... `wp_mail_failed`. Previously, this would have been the originating PHPMailer error code, which could be `0`, which would then fail (pass?) the `empty()` check in the `WP_Error` constructor, thereby rendering the error object fairly useless. The PHPMailer error code is now located within the `WP_Error` data.

props Kau-Boy, stephenharris.
fixes #35598.

Built from https://develop.svn.wordpress.org/trunk@39086


git-svn-id: http://core.svn.wordpress.org/trunk@39028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-02 04:27:34 +00:00