| 7 shortcut.module | shortcut_set_delete_access($shortcut_set) |
| 8 shortcut.module | shortcut_set_delete_access($shortcut_set) |
Access callback for deleting a shortcut set.
Parameters
$shortcut_set: The shortcut set to be deleted.
Return value
TRUE if the current user has access to delete shortcut sets and this is not the site-wide default set; FALSE otherwise.
1 call to shortcut_set_delete_access()
1 string reference to 'shortcut_set_delete_access'
File
- modules/
shortcut/ shortcut.module, line 242 - Allows users to manage customizable lists of shortcut links.
Code
function shortcut_set_delete_access($shortcut_set) {
// Only admins can delete sets.
if (!user_access('administer shortcuts')) {
return FALSE;
}
// Never let the default shortcut set be deleted.
if ($shortcut_set->set_name == SHORTCUT_DEFAULT_SET_NAME) {
return FALSE;
}
return TRUE;
}
Login or register to post comments