mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173. Built from https://develop.svn.wordpress.org/trunk@41845 git-svn-id: http://core.svn.wordpress.org/trunk@41679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
af83fe7fb9
commit
39a2308a94
@ -8384,6 +8384,15 @@
|
||||
var isInsideIframe = false;
|
||||
|
||||
function isCleanState() {
|
||||
|
||||
/*
|
||||
* Handle special case of previewing theme switch since some settings (for nav menus and widgets)
|
||||
* are pre-dirty and non-active themes can only ever be auto-drafts.
|
||||
*/
|
||||
if ( ! api.state( 'activated' ).get() ) {
|
||||
return 0 === api._latestRevision;
|
||||
}
|
||||
|
||||
return api.state( 'saved' ).get() && 'auto-draft' !== api.state( 'changesetStatus' ).get();
|
||||
}
|
||||
|
||||
|
2
wp-admin/js/customize-controls.min.js
vendored
2
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-beta1-41844';
|
||||
$wp_version = '4.9-beta1-41845';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user