$this->
cache_add( 'theme',
array
( 'block_theme' =>
$this->
is_block_theme(),
'headers' =>
$this->headers,
'errors' =>
$this->errors,
'stylesheet' =>
$this->stylesheet,
'template' =>
$this->template,
) );
$this->parent =
new WP_Theme( $this->template,
$this->theme_root,
$this );
return;
} } // Set the parent, if we're a child theme.
if ( $this->template !=
$this->stylesheet
) { // If we are a parent, then there is a problem. Only two generations allowed! Cancel things out.
if ( $_child instanceof WP_Theme &&
$_child->template ==
$this->stylesheet
) { $_child->parent = null;
$_child->errors =
new WP_Error( 'theme_parent_invalid',