Make WordPress Core

Changeset 13020


Ignore:
Timestamp:
02/07/2010 11:19:39 PM (15 years ago)
Author:
ryan
Message:

Slightly more informative error message for themes missing their parent theme. Need to offer to install the parent if it is in the themes directory.

File:
1 edited

Legend:

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

    r13019 r13020  
    298298        }
    299299
     300        $parent_template = $template;
     301
    300302        if ( empty($template) ) {
    301303            if ( file_exists("$theme_root/$stylesheet/index.php") )
     
    320322                    $template_directory = $theme_files[$template]['theme_root'] . "/$template";
    321323                } else {
    322                     $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
     324                    if ( empty( $parent_template) )
     325                        $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'), 'error' => 'no_template');
     326                    else
     327                        $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => sprintf( __('The parent theme is missing. Please install the "%s" parent theme.'),  $parent_template ), 'error' => 'no_parent', 'parent' => $parent_template );
    323328                    continue;
    324329                }
Note: See TracChangeset for help on using the changeset viewer.