mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 05:04:31 +00:00
Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* Prevent autoloading an existing draft/future changeset when theme not active. * Add missing notifications container to Themes panel. * Remove deactivation of themes panel when selected status is not publish. * Show notification in Themes panel when themes cannot be previewed and disable preview buttons. * Reject installTheme call when theme preview not available. * Return promise from installTheme and eliminate use of global events in favor of promises. Props westonruter, melchoyce, zoonini. See #37661, #39896. Fixes #42126. git-svn-id: https://develop.svn.wordpress.org/trunk@41788 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -197,6 +197,15 @@ class Tests_WP_Customize_Manager extends WP_UnitTestCase {
|
||||
) );
|
||||
$this->assertNotContains( $wp_customize->changeset_uuid(), array( $uuid1, $uuid2 ) );
|
||||
$this->assertEmpty( $wp_customize->changeset_post_id() );
|
||||
|
||||
// Make sure existing changeset is not autoloaded in the case of previewing a theme switch.
|
||||
switch_theme( 'twentyseventeen' );
|
||||
$wp_customize = new WP_Customize_Manager( array(
|
||||
'changeset_uuid' => false, // Cause UUID to be deferred.
|
||||
'branching' => false,
|
||||
'theme' => 'twentyfifteen',
|
||||
) );
|
||||
$this->assertEmpty( $wp_customize->changeset_post_id() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user