When looking in a sub-directory of wp-content/themes for more themes, check

if that specific directory exists before looking inside of it for style.css.

This avoids warnings when open_basedir restrictions are in effect.

props goldenapples. see #20985 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@21126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-06-26 03:36:03 +00:00
parent 740d615ce2
commit 3647231af6

View File

@ -393,7 +393,7 @@ function search_theme_directories( $force = false ) {
if ( ! $sub_dirs )
return false;
foreach ( $sub_dirs as $sub_dir ) {
if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' )
if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' )
continue;
if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) )
continue;