Access callback: Checks a user's permission for performing a taxonomy term operation.
$op: The operation to be performed on the taxonomy term. Possible values are:
$term: The $term object on which the operation is to be performed.
TRUE if the operation may be performed, FALSE otherwise.
function taxonomy_term_access($op, $term) {
if (!$term || !in_array($op, array(
'edit',
'delete',
), TRUE)) {
// If there was no term to check against, or the $op was not one of the
// supported ones, we return access denied.
return FALSE;
}
return user_access("{$op} terms in {$term->vid}") || user_access('administer taxonomy');
}