WordPress.org

Make WordPress Core

Changeset 12216


Ignore:
Timestamp:
11/19/09 16:35:17 (4 years ago)
Author:
ryan
Message:

Avoid warning when parent template does not exist.

File:
1 edited

Legend:

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

    r12135 r12216  
    317317                 * so lets use the theme root for the parent template. 
    318318                 */ 
    319                 $parent_theme_root = $theme_files[$template]['theme_root']; 
    320                 if ( file_exists( "$parent_theme_root/$template/index.php" ) ) { 
    321                     $template_directory = "$parent_theme_root/$template"; 
     319                if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) { 
     320                    $template_directory = $theme_files[$template]['theme_root'] . "/$template"; 
    322321                } else { 
    323322                    $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); 
Note: See TracChangeset for help on using the changeset viewer.