// Correct a situation where the theme is 'some-directory/some-theme' but 'some-directory' was passed in as part of the theme root instead.
if ( !
in_array( $theme_root,
(array) $wp_theme_directories, true
) &&
in_array( dirname( $theme_root ),
(array) $wp_theme_directories, true
) ) { $this->stylesheet =
basename( $this->theme_root
) . '/' .
$this->stylesheet;
$this->theme_root =
dirname( $theme_root );
} $this->cache_hash =
md5( $this->theme_root . '/' .
$this->stylesheet
);
$theme_file =
$this->stylesheet . '/style.css';
$cache =
$this->
cache_get( 'theme'
);
if ( is_array( $cache ) ) { foreach ( array
( 'block_theme', 'errors', 'headers', 'template'
) as $key ) { if ( isset( $cache[ $key ] ) ) { $this->
$key =
$cache[ $key ];
} } if ( $this->errors
) { return;
} if ( isset( $cache['theme_root_template'
] ) ) {