When there is the need to create a menu callback accessible to anybody, it's enough to use 'access arguments' => array(TRUE). There is no need to use a function that just returns TRUE.
Normally, the permission used in such cases is access content; therefore the code becomes 'access arguments' => array('access content').

Comments

avpaderno’s picture

The shorter way to define a menu callback that doesn't have a limited access is to use

'access callback' => TRUE

This is reported in the Drupal documentation, on the line where it says

We support 'access callback' => TRUE (and FALSE of course).

Zohar.Babin’s picture

Status: Active » Fixed

fixed in 6.x-1.4 and 5.x-1.3

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.