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.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
333f5b0cfa
commit
4b2651d1e6
|
@ -297,6 +297,8 @@ function get_themes() {
|
||||||
$title = $name;
|
$title = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parent_template = $template;
|
||||||
|
|
||||||
if ( empty($template) ) {
|
if ( empty($template) ) {
|
||||||
if ( file_exists("$theme_root/$stylesheet/index.php") )
|
if ( file_exists("$theme_root/$stylesheet/index.php") )
|
||||||
$template = $stylesheet;
|
$template = $stylesheet;
|
||||||
|
@ -319,7 +321,10 @@ function get_themes() {
|
||||||
if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) {
|
if ( isset($theme_files[$template]) && file_exists( $theme_files[$template]['theme_root'] . "/$template/index.php" ) ) {
|
||||||
$template_directory = $theme_files[$template]['theme_root'] . "/$template";
|
$template_directory = $theme_files[$template]['theme_root'] . "/$template";
|
||||||
} else {
|
} else {
|
||||||
$wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
|
if ( empty( $parent_template) )
|
||||||
|
$wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'), 'error' => 'no_template');
|
||||||
|
else
|
||||||
|
$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 );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue