From d8ac6f441fb995ede3de7b160c2e8ac17141cedb Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Thu, 11 Nov 2010 03:26:07 -0500 Subject: [PATCH] #968630: Let widgets modify template variables. --- vud.theme.inc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git vud.theme.inc vud.theme.inc index db53654..91f3a83 100644 --- vud.theme.inc +++ vud.theme.inc @@ -94,6 +94,10 @@ function vud_pseudo_theming($vote_entity, $template_type, $plugin, &$variables) // let modules modify variables passed to the template $variables_type = 'vud_' . $template_type . '_template_variables'; drupal_alter($variables_type, $variables); + // let widget modify variables passed to the template + if ($function = ctools_plugin_get_function($plugin, 'alter template variables')) { + $function($template_type, $variables); + } // and then provide template suggestions by hand $suggestions = module_invoke('vud_' . $vote_entity, 'template_suggestions', $template_type, $plugin, $variables['content_id']); -- 1.7.2.3