Use WP_Theme::exists(). see #20361.
git-svn-id: https://develop.svn.wordpress.org/trunk@20379 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6f9ceb2326
commit
7dbfae77c0
@ -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
Block a user