Skip to content
Snippets Groups Projects
Commit ed845cd6 authored by Fabian Franz's avatar Fabian Franz
Browse files

Revert "Issue #2652834 by david_garcia, Fabianx: Allow the use of callbacks...

Revert "Issue #2652834 by david_garcia, Fabianx: Allow the use of callbacks instead of global functions in theme processor functions"

This reverts commit d73dc6b1.
parent d73dc6b1
No related branches found
No related tags found
No related merge requests found
......@@ -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
-----------------------
......
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment