You are here

function views_menu in Views (for Drupal 7) 7.3

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

Implements hook_menu().

File

./views.module, line 419
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_menu() {
  $items = array();
  $items['views/ajax'] = array(
    'title' => 'Views',
    'page callback' => 'views_ajax',
    'theme callback' => 'ajax_base_page_theme',
    'delivery callback' => 'ajax_deliver',
    'access callback' => TRUE,
    'description' => 'Ajax callback for view loading.',
    'type' => MENU_CALLBACK,
    'file' => 'includes/ajax.inc',
  );

  // Path is not admin/structure/views due to menu complications with the
  // wildcards from the generic ajax callback.
  $items['admin/views/ajax/autocomplete/user'] = array(
    'page callback' => 'views_ajax_autocomplete_user',
    'theme callback' => 'ajax_base_page_theme',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access user profiles',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'includes/ajax.inc',
  );

  // Define another taxonomy autocomplete because the default one of drupal
  // does not support a vid a argument anymore.
  $items['admin/views/ajax/autocomplete/taxonomy'] = array(
    'page callback' => 'views_ajax_autocomplete_taxonomy',
    'theme callback' => 'ajax_base_page_theme',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'includes/ajax.inc',
  );
  return $items;
}