diff --git a/core/includes/theme.inc b/core/includes/theme.inc index daf5cac..d07bf35 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -996,8 +996,8 @@ function theme($hook, $variables = array()) { // Supply original caller info. $variables += array( - '#theme_hook' => $base_theme_hook, - '#theme_hook_original' => $original_hook, + 'theme_hook' => $base_theme_hook, + 'theme_hook_original' => $original_hook, ); // Invoke hook_theme_suggestions_HOOK(). diff --git a/core/modules/system/tests/modules/theme_test/theme_test.module b/core/modules/system/tests/modules/theme_test/theme_test.module index b088e7d..1c9ac46 100644 --- a/core/modules/system/tests/modules/theme_test/theme_test.module +++ b/core/modules/system/tests/modules/theme_test/theme_test.module @@ -198,11 +198,8 @@ function theme_test_theme_suggestions_theme_test_suggestion_provided(array $vari * Implements hook_theme_prepare(). */ function theme_test_theme_prepare(&$variables, $hook) { - // Only prepare for the base hook. - if ($hook === 'theme_test_prepare') { - $variables['hook'] = $variables['#theme_hook_original']; - } - elseif ($hook === 'theme_test_prepare_element') { + // Only prepare variables for a specific base theme hook. + if ($hook === 'theme_test_prepare_element') { $variables['element']['moduleInjectedVariable1'] = array( '#theme' => 'theme_test_prepare__element', '#title' => 'moduleInjectedVariable1',