Changeset 4404

Show
Ignore:
Timestamp:
10/18/06 20:24:59 (2 years ago)
Author:
ryan
Message:

Fix handling of stylesheet only themes that live two-levels deep.

Files:

Legend:

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

    r4401 r4404  
    184184 
    185185        if ( !file_exists("$theme_root/$template/index.php") ) { 
    186             $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); 
    187             continue; 
     186            $parent_dir = dirname(dirname($theme_file)); 
     187            if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { 
     188                $template = "$parent_dir/$template";     
     189            } else { 
     190                $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); 
     191                continue; 
     192            } 
    188193        } 
    189194