From f34a43bf4ee36ed2ba282f9b10ebcf5bf57c8371 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 9 Nov 2004 02:29:01 +0000 Subject: [PATCH] Put the right index.php in the template file list for the default theme. git-svn-id: https://develop.svn.wordpress.org/trunk@1846 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 30db041e10..212f828833 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2045,11 +2045,18 @@ function get_themes() { } } - $default_files = array(get_settings('blogfilename'), 'wp-comments.php', 'wp-comments-popup.php', 'wp-comments-post.php', 'wp-footer.php', 'wp-header.php', 'wp-sidebar.php', 'footer.php', 'header.php', 'sidebar.php'); + $default_files = array('wp-comments.php', 'wp-comments-popup.php', 'wp-comments-post.php', 'wp-footer.php', 'wp-header.php', 'wp-sidebar.php', 'footer.php', 'header.php', 'sidebar.php'); // Get the files for the default template. $default_template_files = array(); { + // Find the index. + if (file_exists(ABSPATH .'wp-content/index.php')) { + $default_template_files[] = 'wp-content/index.php'; + } else { + $default_template_files[] = 'index.php'; + } + $dirs = array('', 'wp-content'); foreach ($dirs as $dir) { $template_dir = @ dir(ABSPATH . $dir);