[38058] changed `wp_mail()` so that it used PHPMailer's `setFrom()`
method rather than setting the From and FromName headers directly. See
behavior of setting the `Sender` field. This causes `mail` to be
called with the `-f` flag, which causes outgoing email to fail on some
server environments.
Merges [38286] to the 4.6 branch.
Props Clorith, iandunn, DrewAPicture.
Fixes#37736.
Built from https://develop.svn.wordpress.org/branches/4.6@38287
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Allow to add/remove a featured image to `attachment:audio` and `attachment:video` post types, see [27657].
* Change conditionals to check for theme OR post type support.
* Add tests for #12922.
Broken in [37658].
Merge of [38263] to the 4.6 branch.
Props flixos90, joemcgill, DrewAPicture, wonderboymusic.
See #12922.
See #37658.
Built from https://develop.svn.wordpress.org/branches/4.6@38264
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Add `srcset` and `sizes` to the mobile image for streamlined updates.
* Modify the order of image candidate strings in each `srcset` to address a bug in iOS8 where the first candidate will always be selected when using `w` descriptors, see #35030.
Merge of [38257] to the 4.6 branch.
Props joemcgill.
See #37246.
Built from https://develop.svn.wordpress.org/branches/4.6@38258
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`wp_resource_hints()` parses the URL for the `preconnect` and `dns-prefetch` relation types to ensure correct values for both. While protocol-relative URLs are supported for `dns-prefetch`, the double slash was lost for `preconnect`.
Merge of [38255] to the 4.6 branch.
Props swissspidy, peterwilsoncc.
Props azaozz for review.
See #37652.
Built from https://develop.svn.wordpress.org/branches/4.6@38256
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Merges [38251] to the 4.6 branch.
First added in [37588] and later modified in [38224], the idea was to ensure that filters/actions added before `advance-cache.php` would not disappear if `advance-cache.php` overloaded the filters/actions with code such as `$wp_filter = array()`. This is an edge case and one that there is no documented case of existing.
This restores the behavior from WordPress 4.5 and before. It is strongly encouraged that developers using `advance-cache.php` to use the Plugins API that is available before the loading of `advance-cache.php` rather than directly interacting with any of the globals.
Props azaozz, jorbin, dd32 for review, pento for review, westi for investigation, ipstenu for research.
See #36819.
Built from https://develop.svn.wordpress.org/branches/4.6@38252
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change restores only the margin and padding styles for the `.update-message` class when used by plugins in the context of adding arbitrary rows to the list table. The inline-update colors and icon styles were not restored, expressly with a wide variety of plugin use-cases in mind.
Merge of [38237] to the 4.6 branch.
Props ovann86, rahulsprajapati, ocean90, DrewAPicture.
Props helen for review.
Fixes#37504.
Built from https://develop.svn.wordpress.org/branches/4.6@38238
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The default error handler `wp_handle_upload_error()` expects a reference for the first parameter but `call_user_func()` doesn't pass parameters by reference. The current code didn't produce any issues until now. PHP 7.0.9 (and PHP 7.1) is now stricter and prevents calling the error handler with a warning:
> PHP Warning: Parameter 1 to wp_handle_upload_error() expected to be a reference, value given.
To restore the error handler `_wp_handle_upload()` now uses `call_user_func_array()`.
Merge of [38235] to the 4.6 branch.
Props jbrinley.
Props jorbin for review.
See #37570.
Built from https://develop.svn.wordpress.org/branches/4.6@38236
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This corrects the selector for the delete link in `wp.updates.deletePlugin()` so the text can be changed to 'Deleting…'. `wp.updates.deleteTheme()` already worked on wp-admin/themes.php but not on wp-admin/network/themes.php because the network screen is similar to the plugins list table, this is now fixed too.
The `credential-modal-cancel` handler has been updated to support canceled delete jobs.
Merge of [38227] to the 4.6 branch.
Props swissspidy.
Props jorbin for review.
See #37603.
Built from https://develop.svn.wordpress.org/branches/4.6@38228
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[37588] added methods to backup the plugin globals, for ensuring that advanced cache drop-ins don't overwrite hooks that've been added earlier in the load process.
The method for restoring the plugin globals wasn't compatible with the implementation of `WP_Hook` in #17817. `WP_Hook` implements `ArrayAccess`, so `_restore_plugin_globals()` was treating it as an array, and inadvertantly overwriting the `WP_Hook` object with a plain array.
To avoid having to re-write this code as part of #17817, we now use `add_filter()` to restore any hooks that were added by cache drop-ins, which `WP_Hook` correctly supports.
Merge of [38223] with the 4.6 branch.
Props pento, jorbin.
Fixes#36819.
Built from https://develop.svn.wordpress.org/branches/4.6@38224
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Merges [38221] to the 4.6 branch.
Before this change, when a bulk update was canceled due dismissing the FTP credentials modal, part of the actions didn't get canceled. This meant the "There is a new version of…” notices become blank and the updates you had checked became unchecked. Now, the notices remain and you are essentially returned to the screen you had before. Strings are also updated to improve ARIA usage.
Fixes#37563.
Props ocean90, swissspidy, obenland, afercia.
Built from https://develop.svn.wordpress.org/branches/4.6@38222
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[37262] changed a check in `redirect_canonical()` so that it checked
categories in the object cache rather than querying the database. However,
the check was based on the identity of `WP_Term` objects, which in
certain cases can be augmented by the main WP query routine, causing
failures of the `in_array()` check. This caused unnecessary redirects
for URLs where `is_single()` is true, but the URL is different from the
post permalink, such as the `embed` endpoint.
`has_term()` also checks the cache, but does not sufer from this bug.
Merges [38216] to the 4.6 branch.
Props cmillerdev.
Fixes#36602.
Built from https://develop.svn.wordpress.org/branches/4.6@38220
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Merges [38218] in to 4.6 branch.
Custom JS events are triggered on the document in order for plugins to have something to hook into. The standard began in #31819 is dash separated and begins with wp to signify the namespace, followed by the subject of our action ( "theme", "plugin", etc.) followed by the action and an optional indicator of status ( "install-success", "deleting" ).
This brings some of the theme hooks in line with the standard. As of now, all plugin actions in src/wp-admin/js/updates.js have an equal corresponding theme action.
Fixes#37598.
See #37512, #37216, #31819.
Props olarmarius, ocean90.
Built from https://develop.svn.wordpress.org/branches/4.6@38219
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38160 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'.
* "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'.
* Escape the message in `wp-updates-admin-notice` because the response may include HTML.
* Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable.
Merge of [38205] to the 4.6 branch.
Props azaozz for review.
See #37583.
Built from https://develop.svn.wordpress.org/branches/4.6@38206
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
An upgrader class is used in conjunction with an upgrader skin class. A skin class handles the logging for an upgrade and informs a user about the progress and failures.
The current Ajax install/update handlers are using the `Automatic_Upgrader_Skin` class because during an Ajax request no output is intended. The difference between Ajax updates and automatic updates is that you will see the full log (usually by email) while Ajax updates focus only on success or failure. For that `Automatic_Upgrader_Skin` has one disadvantage: It doesn't provide a way to retrieve failure messages which were passed through `WP_Upgrader_Skin::error()` by the upgrader.
To solve this issue a new skin `WP_Ajax_Upgrader_Skin` has been introduced. The skin extends `Automatic_Upgrader_Skin` and overrides the `error()` and `feedback()` methods to intercept all errors, which can be a `WP_Error` object or a string.
This updates all four Ajax handler for installing/updating themes/plugins to use the new skin. They now also check the skin for any intercepted errors and pass them on to the user.
Merge of [38199] to the 4.6 branch.
Props flixos90, obenland, ocean90.
Props DrewAPicture, pento for review.
See #37531.
Built from https://develop.svn.wordpress.org/branches/4.6@38200
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[38179] added support for the rainbow flag to core, but platform compatibility is a bit strange, because the flag was defined out of sync with the usual Unicode release cycle. For example Android N supports all Unicode 9.0 emoji, but doesn't support the rainbow flag thus the rainbow flag isn't rendered.
The Twemoji loader already has an exception for flags - it'll load if the browser supports everything but flags, and then only replace flag emoji, leaving everything else as native rendering. To provide a seamless experience for all flags the loader now uses the rainbow flag to test flag support.
Merge of [38194] to the 4.6 branch.
Props pento.
See #37543.
See #37566.
Built from https://develop.svn.wordpress.org/branches/4.6@38195
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The button was introduced in [37901] to allow users switching to the selected menu for further edits. A link makes it more clear that the user is taken away from the current view.
This also adds an aria label and makes the button label more verbose, 'Edit Menu'.
Merge of [38189] to the 4.6 branch.
Props afercia.
Props helen for review.
See #36795.
Built from https://develop.svn.wordpress.org/branches/4.6@38190
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Merge of [38185] to the 4.6 branch
When doing a bulk update, if there are failures the user needs to know about that. This makes it clearer that you can click on the notification to see more details, especially for screen reader users.
Fixes#37510.
Props juhise, Ankit K Gupta, afercia, jorbin, ocean90.
Built from https://develop.svn.wordpress.org/branches/4.6@38187
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twemoji recently added images for the Rainbow and Pirate flags, and the latest iOS 10 beta added support for the Rainbow flag. Never let it be said that WordPress is at anything less than the cutting edge of emoji research and development.
Merge of [38179] to the 4.6 branch.
Props ocean90 for the code review.
Fixes#37543.
Built from https://develop.svn.wordpress.org/branches/4.6@38180
git-svn-id: http://core.svn.wordpress.org/branches/4.6@38121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Events for updating exist, but they lack context. This adds args so that plugins can detec t what plugin/theme is being installed. Additionally, events for bulk actions, deleting and that and install is starting didn't exist, so this adds them.
Fixes#37512.
Props DavidAnderson, and ocean90, swissspidy for review.
Built from https://develop.svn.wordpress.org/trunk@38175
git-svn-id: http://core.svn.wordpress.org/trunk@38116 1a063a9b-81f0-0310-95a4-ce76da25c4cd