diff --git a/includes/theme.inc b/includes/theme.inc index ebe5817..6550c07 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2839,6 +2839,25 @@ function template_preprocess_region(&$variables) { } /** + * Process variables for region.tpl.php + * + * Perform final addition of variables before passing them into the template. + * To customize these variables, simply set them in an earlier step. + * + * @see template_preprocess_region() + * @see region.tpl.php + */ +function template_process_region(&$variables) { + if (!empty($variables['elements']['#attributes']['class'])) { + // Merge new classes. + $variables['classes_array'] = array_merge($variables['elements']['#attributes']['class'], $variables['classes_array']); + + // Flatten out classes. + $variables['classes'] = implode(' ', $variables['classes_array']); + } +} + +/** * Preprocesses variables for theme_username(). * * Modules that make any changes to variables like 'name' or 'extra' must insure