From cb17ed80060d731e68a6e261e3ef7dc2c60bcd5e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 21 Nov 2012 18:58:19 +0000 Subject: [PATCH] WP_Theme: If the parent theme is missing, instantiate a WP_Theme object anyway, so it can hold errors. Fixes the installation of parent themes when installing a child theme from WordPress.org. see #22515. git-svn-id: https://develop.svn.wordpress.org/trunk@22784 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-theme.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/class-wp-theme.php b/wp-includes/class-wp-theme.php index a6632e80f6..f31b5e9465 100644 --- a/wp-includes/class-wp-theme.php +++ b/wp-includes/class-wp-theme.php @@ -254,6 +254,7 @@ final class WP_Theme implements ArrayAccess { // Parent theme is missing. $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), $this->template ) ); $this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) ); + $this->parent = new WP_Theme( $this->template, $this->theme_root, $this ); return; } }