You are here

function termstatus_menu_access in Taxonomy Term Status 7

Menu access callback. Return true if access to term is granted.

1 string reference to 'termstatus_menu_access'
termstatus_menu_alter in ./termstatus.module
Implements hook_menu_alter().

File

./termstatus.module, line 257
Hook implementations and API for the taxonomy term status module.

Code

function termstatus_menu_access($term, $orig_callback, $orig_arguments) {
  if ($orig_callback && !call_user_func_array($orig_callback, $orig_arguments)) {
    return FALSE;
  }
  if (variable_get('termstatus_enable', FALSE) && !user_access('administer taxonomy') && !user_access('view unpublished taxonomy terms')) {
    return !empty($term->status);
  }
  return TRUE;
}