diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0034ace70ca074c5484b1b624982fb2baad3a034..531357609c30ea0e88eaf05d559656364f4d6c4b 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 991beea960fe8c181d0493fb2f6b17ecdc0e78f3..ff54d6e2c542fa9315bd1f7d4d897670b50e6e51 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); } }