Make WordPress Core

Changeset 22784


Ignore:
Timestamp:
11/21/2012 06:58:19 PM (12 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-theme.php

    r22054 r22784  
    255255                $this->errors = new WP_Error( 'theme_no_parent', sprintf( __( 'The parent theme is missing. Please install the "%s" parent theme.' ), $this->template ) );
    256256                $this->cache_add( 'theme', array( 'headers' => $this->headers, 'errors' => $this->errors, 'stylesheet' => $this->stylesheet, 'template' => $this->template ) );
     257                $this->parent = new WP_Theme( $this->template, $this->theme_root, $this );
    257258                return;
    258259            }
Note: See TracChangeset for help on using the changeset viewer.