// Match templates based on the 'template' filename.
foreach ($cache as $hook => $info) {
if (isset($info['template'])) {
- $template_candidates = [$info['template'], str_replace($info['theme path'] . '/templates/', '', $info['template'])];
- if (in_array($template, $template_candidates)) {
+ if ($template === $info['template']) {
$implementations[$hook] = [
'template' => $template,
'path' => dirname($file->uri),
*
* @param array $theme_settings
* An array of theme settings from system setting form or a Drupal 7 variable.
- * @param Config $config
+ * @param \Drupal\Core\Config\Config $config
* The configuration object to update.
*
* @return