WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/27/2009 05:32:12 PM (11 years ago)
Author:
ryan
Message:

Theme subdirs that contain themes are not broken if missing a stylesheet. see #10467

File:
1 edited

Legend:

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

    r12118 r12119  
    566566                    $theme_subdirs = @opendir( $subdir );
    567567
     568                    $found_subdir_themes = false;
    568569                    while ( ($theme_subdir = readdir($theme_subdirs)) !== false ) {
    569570                        if ( is_dir( $subdir . '/' . $theme_subdir) && is_readable($subdir . '/' . $theme_subdir) ) {
     
    578579                                    $theme_files["$theme_dir/$theme_subdir"] = array( 'theme_file' => $subdir_name . '/' . $theme_subdir . '/' . $theme_file, 'theme_root' => $theme_root );
    579580                                    $found_stylesheet = true;
     581                                    $found_subdir_themes = true;
    580582                                    break;
    581583                                }
     
    585587                    }
    586588                    @closedir($theme_subdir);
    587                     $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
     589                    if ( !$found_subdir_themes )
     590                        $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.'));
    588591                }
    589592            }
Note: See TracChangeset for help on using the changeset viewer.