Use WP_Theme::exists(). see #20361.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
de41bc288b
commit
789b3714d3
|
@ -51,7 +51,7 @@ else
|
|||
|
||||
$theme = wp_get_theme( $stylesheet );
|
||||
|
||||
if ( ! $theme )
|
||||
if ( ! $theme->exists() )
|
||||
wp_die( __( 'The requested theme does not exist.' ) );
|
||||
|
||||
$allowed_files = $theme->get_files( 'php', 1 );
|
||||
|
|
Loading…
Reference in New Issue