You are here

function template_preprocess_link_badges_views_view in Link Badges 8

Preprocess the menu badge views display.

File

./link_badges.module, line 93
Link Badges module file.

Code

function template_preprocess_link_badges_views_view(&$vars) {
  $view = $vars['view'];
  $vars['rows'] = !empty($view->result) || $view->style_plugin
    ->even_empty() ? $view->style_plugin
    ->render($view->result) : '';
  if (!empty($vars['rows'])) {
    $rendered = drupal_render($vars['rows']);
    $vars['badge_result'] = trim(strip_tags($rendered));
  }
  else {
    $vars['badge_result'] = NULL;
  }
}