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: http://core.svn.wordpress.org/trunk@22784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55a6c62e76
commit
5da775fe3b
|
@ -254,6 +254,7 @@ final class WP_Theme implements ArrayAccess {
|
||||||
// Parent theme is missing.
|
// 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->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->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;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue