WordPress.org

Make WordPress Core

Changeset 21126


Ignore:
Timestamp:
06/26/12 03:36:03 (22 months ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r21080 r21126  
    394394                    return false; 
    395395                foreach ( $sub_dirs as $sub_dir ) { 
    396                     if ( ! is_dir( $theme_root . '/' . $dir ) || $dir[0] == '.' || $dir == 'CVS' ) 
     396                    if ( ! is_dir( $theme_root . '/' . $dir . '/' . $sub_dir ) || $dir[0] == '.' || $dir == 'CVS' ) 
    397397                        continue; 
    398398                    if ( ! file_exists( $theme_root . '/' . $dir . '/' . $sub_dir . '/style.css' ) ) 
Note: See TracChangeset for help on using the changeset viewer.