function views_contextual_links_view_alter

Implements hook_contextual_links_view_alter().

File

drupal/core/modules/views/views.module, line 613
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_contextual_links_view_alter(&$element, $items) {

  // If we are rendering views-related contextual links attached to the overall
  // page array, add a class to the list of contextual links. This will be used
  // by the JavaScript added in views_preprocess_html().
  if (!empty($element['#element']['#views_contextual_links_info']) && !empty($element['#element']['#type']) && $element['#element']['#type'] == 'page') {
    $element['#attributes']['class'][] = 'views-contextual-links-page';
  }
}