function views_ui_preprocess_views_view

Theme preprocess for views-view.tpl.php.

File

drupal/core/modules/views/views_ui/views_ui.module, line 409
Provide structure for the administrative interface to Views.

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;
    foreach (array(
      'title',
      'header',
      'exposed',
      'rows',
      'pager',
      'more',
      'footer',
      'empty',
      'attachment_after',
      'attachment_before',
    ) 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_ui_container',
          ),
          '#attributes' => array(
            'class' => 'contextual-region',
          ),
        );
        $vars[$section] = drupal_render($vars[$section]);
      }
    }
  }
}