From ed845cd6d4a6ac403b18b537d881b1622ddd6a58 Mon Sep 17 00:00:00 2001 From: Fabian Franz <Fabianx@693738.no-reply.drupal.org> Date: Tue, 5 Jul 2016 02:13:17 -0700 Subject: [PATCH] Revert "Issue #2652834 by david_garcia, Fabianx: Allow the use of callbacks instead of global functions in theme processor functions" This reverts commit d73dc6b11e03d8abb62ca742603481b53225442e. --- CHANGELOG.txt | 2 -- includes/theme.inc | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0034ace70ca0..531357609c30 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -61,8 +61,6 @@ Drupal 7.50, xxxx-xx-xx (development version) - Made it possible to use any callable as an ajax form callback. - Made it possible to use any callable as menu access, menu theme, menu title and page delivery callback. -- Made it possible to use any callable as a theme processor or theme function - callback. Drupal 7.44, 2016-06-15 ----------------------- diff --git a/includes/theme.inc b/includes/theme.inc index 991beea960fe..ff54d6e2c542 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1119,7 +1119,7 @@ function theme($hook, $variables = array()) { foreach (array('preprocess functions', 'process functions') as $phase) { if (!empty($info[$phase])) { foreach ($info[$phase] as $processor_function) { - if (is_callable($processor_function)) { + if (function_exists($processor_function)) { // We don't want a poorly behaved process function changing $hook. $hook_clone = $hook; $processor_function($variables, $hook_clone); @@ -1157,7 +1157,7 @@ function theme($hook, $variables = array()) { // Generate the output using either a function or a template. $output = ''; if (isset($info['function'])) { - if (is_callable($info['function'])) { + if (function_exists($info['function'])) { $output = $info['function']($variables); } } -- GitLab