Customize: Ensure valid themes in the preview.

Merge of [41397] to the 4.4 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.4@41433 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2017-09-19 11:49:52 +00:00
parent 25440a3777
commit 895a2d0762

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.