Skip to content

Commit

Permalink
WP_Theme: If the parent theme is missing, instantiate a WP_Theme obje…
Browse files Browse the repository at this point in the history
…ct anyway, so it can hold errors.

Fixes the installation of parent themes when installing a child theme from WordPress.org.

see #22515.
for the 3.4 branch.



git-svn-id: http://core.svn.wordpress.org/branches/3.4@22862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nacin committed Nov 27, 2012
1 parent 72dc6fe commit c57a46c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wp-includes/class-wp-theme.php
Expand Up @@ -253,6 +253,7 @@ public function __construct( $theme_dir, $theme_root, $_child = null ) {
// 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;
}
}
Expand Down

0 comments on commit c57a46c

Please sign in to comment.