Make WordPress Core


Ignore:
Timestamp:
10/07/2017 05:59:45 AM (8 years ago)
Author:
westonruter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r41750 r41788  
    197197        ) );
    198198        $this->assertNotContains( $wp_customize->changeset_uuid(), array( $uuid1, $uuid2 ) );
     199        $this->assertEmpty( $wp_customize->changeset_post_id() );
     200
     201        // Make sure existing changeset is not autoloaded in the case of previewing a theme switch.
     202        switch_theme( 'twentyseventeen' );
     203        $wp_customize = new WP_Customize_Manager( array(
     204            'changeset_uuid' => false, // Cause UUID to be deferred.
     205            'branching' => false,
     206            'theme' => 'twentyfifteen',
     207        ) );
    199208        $this->assertEmpty( $wp_customize->changeset_post_id() );
    200209    }
Note: See TracChangeset for help on using the changeset viewer.