Access callback evaluated on every page I have a custom module with a menu entry that has a page callback and a access callback. However, every time I visit any page, the access callback is evaluated. Could somebody enlighten me?

function foo_menu() {
  $items = array();

  $items['foo'] = array(
    'page callback' =&gt; 'foo',
    'access callback' =&gt; 'foo_access_callback',
  );

  return $items;
}

function foo() {
  //...
}

function foo_access_callback() {
  error_log('This gets evaluated on every page.');
  return TRUE;
}
Something just dawned on me...if you have a menu on the page that links to the '/foo' page, Drupal will query the access callback to find out if the menu link can be shown. 

Since you're not providing a type in your menu item, it will default to MENU_NORMAL_ITEM which will place it in the site's Navigation menu.

I would guess that's what's causing the function to be run at least once on every front end page, but not for the admin pages (where you probably won't have the same menus).

It's definitely what was causing the issue on the test installation I just set up for this.