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
This commit is contained in:
parent
e4759d815d
commit
cb17ed8006
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user