Customize: Run a partial's fallback behavior (full refresh) when selective refresh fails due to a script error.

This ensures that 3rd-party scripts that users paste into Text widgets will gracefully recover and result in the expected preview.

See #27355.
Fixes #40658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@40629 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-05-17 00:01:40 +00:00
parent 8c7ea71edb
commit 509e706c13
3 changed files with 3 additions and 2 deletions

View File

@ -457,6 +457,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
if ( 'undefined' !== typeof console && console.error ) {
console.error( partial.id, error );
}
partial.fallback( error, [ placement ] );
}
/* jshint ignore:start */
document.write = self.orginalDocumentWrite;

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.8-beta1-40736';
$wp_version = '4.8-beta1-40771';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.