You are here

function views_menu in Views (for Drupal 7) 5

Same name and namespace in other branches
  1. 8.3 views.module \views_menu()
  2. 6.3 views.module \views_menu()
  3. 6.2 views.module \views_menu()
  4. 7.3 views.module \views_menu()

Implementation of hook_menu()

File

./views.module, line 19

Code

function views_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    views_load_cache();

    // Invalidate the views cache to ensure that views data gets rebuilt.
    // This is the best way to tell that module configuration has changed.
    if (arg(0) == 'admin' && arg(2) == 'modules') {
      views_invalidate_cache();
    }
    views_menu_standard_items($items);
  }
  else {
    views_menu_inline_items($items);
  }
  return $items;
}