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/src/wp-includes/class-wp-customize-manager.php

    r41771 r41788  
    608608            $changeset_uuid = null;
    609609
    610             if ( ! $this->branching() ) {
     610            if ( ! $this->branching() && $this->is_theme_active() ) {
    611611                $unpublished_changeset_posts = $this->get_changeset_posts( array(
    612612                    'post_status' => array_diff( get_post_stati(), array( 'auto-draft', 'publish', 'trash', 'inherit', 'private' ) ),
Note: See TracChangeset for help on using the changeset viewer.