function views_ui_preprocess_views_view
Theme preprocess for views-view.tpl.php.
File
-
./
views_ui.module, line 401
Code
function views_ui_preprocess_views_view(&$vars) {
$view = $vars['view'];
if (!empty($view->views_ui_context) && module_exists('contextual')) {
$view->hide_admin_links = TRUE;
$sections = array(
'title',
'header',
'exposed',
'rows',
'pager',
'more',
'footer',
'empty',
'attachment_after',
'attachment_before',
);
foreach ($sections as $section) {
if (!empty($vars[$section])) {
$vars[$section] = array(
'#theme' => 'views_ui_view_preview_section',
'#view' => $view,
'#section' => $section,
'#content' => is_array($vars[$section]) ? drupal_render($vars[$section]) : $vars[$section],
'#theme_wrappers' => array(
'views_container',
),
'#attributes' => array(
'class' => 'contextual-links-region',
),
);
$vars[$section] = drupal_render($vars[$section]);
}
}
}
}