From 70b6bbcfa8ae7a733747a6a9863883b84f2971d7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 14 Dec 2010 19:17:49 +0000 Subject: [PATCH] Revert to WP_DEFAULT_THEME if a child theme is in use and no style.css is present. fixes #15712. git-svn-id: https://develop.svn.wordpress.org/trunk@16924 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/theme.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 420a6844ea..838bb27cf6 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1286,6 +1286,11 @@ function validate_current_theme() { switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); return false; } + + if ( is_child_theme() && ! file_exists( get_stylesheet_directory() . '/style.css' ) ) { + switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); + return false; + } return true; }