Customize: Ensure valid themes in the preview.

Merge of [41397] to the 4.4 branch.

Built from https://develop.svn.wordpress.org/branches/4.4@41433


git-svn-id: http://core.svn.wordpress.org/branches/4.4@41266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2017-09-19 11:52:37 +00:00
parent 9d802e8a45
commit c448e53286
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ final class WP_Customize_Manager {
$this->original_stylesheet = get_stylesheet();
$this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null );
$this->theme = wp_get_theme( isset( $_REQUEST['theme'] ) && 0 === validate_file( $_REQUEST['theme'] ) ? $_REQUEST['theme'] : null );
if ( $this->is_theme_active() ) {
// Once the theme is loaded, we'll validate it.