From ec269e42832893d18057ab1a113e2462d0a3bb50 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 19 Sep 2017 08:38:43 +0000 Subject: [PATCH] Customize: Ensure valid themes in the preview. git-svn-id: https://develop.svn.wordpress.org/trunk@41397 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-manager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index fa97e3f680..5e66a1aa75 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -271,7 +271,7 @@ final class WP_Customize_Manager { } $this->original_stylesheet = get_stylesheet(); - $this->theme = wp_get_theme( $args['theme'] ); + $this->theme = wp_get_theme( 0 === validate_file( $args['theme'] ) ? $args['theme'] : null ); $this->messenger_channel = $args['messenger_channel']; $this->settings_previewed = ! empty( $args['settings_previewed'] ); $this->_changeset_uuid = $args['changeset_uuid'];