Colorbox menu access check.
1 string reference to '_colorbox_form_page_access'
- colorbox_menu in ./
colorbox.module - Implements hook_menu().
File
-
./
colorbox.module, line 111
Code
function _colorbox_form_page_access($form_id) {
$access = FALSE;
// First check if this is one of the forms Colorbox support out of the box.
switch ($form_id) {
case 'contact_site_form':
$access = user_access('access site-wide contact form');
break;
case 'user_register_form':
$access = user_register_access();
break;
case 'user_pass':
case 'user_login':
case 'user_login_block':
$access = user_is_anonymous();
break;
}
// Invoke hook_colorbox_form_access for all modules.
if (!$access) {
foreach (module_implements('colorbox_form_access') as $module) {
if ($access = module_invoke($module, 'colorbox_form_access', $form_id)) {
return $access;
}
}
}
return $access;
}