return;
} } // If we got our data from cache, we can assume that 'template' is pointing to the right place.
if ( !
is_array( $cache ) &&
$this->template !=
$this->stylesheet && !
file_exists( $this->theme_root . '/' .
$this->template . '/index.php'
) ) { /*
* If we're in a directory of themes inside /themes, look for the parent nearby.
* wp-content/themes/directory-of-themes/*
*/
$parent_dir =
dirname( $this->stylesheet
);
$directories =
search_theme_directories();
if ( '.' !==
$parent_dir &&
file_exists( $this->theme_root . '/' .
$parent_dir . '/' .
$this->template . '/index.php'
) ) { $this->template =
$parent_dir . '/' .
$this->template;
} elseif ( $directories &&
isset( $directories[ $this->template
] ) ) { /*
* Look for the template in the search_theme_directories() results, in case it is in another theme root.
* We don't look into directories of themes, just the theme root.
*/
$theme_root_template =
$directories[ $this->template
]['theme_root'
];
} else { // Parent theme is missing.