function commons_origins_preprocess_panelizer_view_mode in Drupal Commons 7.3
Implements hook_preprocess_panelizer_view_mode().
File
- themes/
commons/ commons_origins/ template.php, line 510 - Process theme data.
Code
function commons_origins_preprocess_panelizer_view_mode(&$variables, $hook) {
// Add classed to identity the entity type being overridden.
$variables['classes_array'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type']);
$variables['title_attributes_array']['class'][] = drupal_html_class($variables['element']['#entity_type'] . '-title');
$variables['title_attributes_array']['class'][] = drupal_html_class('panelizer-' . $variables['element']['#entity_type'] . '-title');
// Add some extra theme hooks for the subthemers.
$variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type'];
$variables['hook_theme_suggestions'][] = $hook . '__' . $variables['element']['#entity_type'] . '__' . $variables['element']['#bundle'];
}