function hosting_menu_access in Hosting 6.2
Same name and namespace in other branches
- 7.4 hosting.module \hosting_menu_access()
- 7.3 hosting.module \hosting_menu_access()
Menu access callback for creating a node provided by a Hosting feature.
Parameters
$type: The node type that the user wants to create.
$feature: The machine name of the host feature that should be additionally checked to see if it's enabled.
Return value
TRUE if the user can access, FALSE otherwise.
1 string reference to 'hosting_menu_access'
- hosting_menu_alter in ./
hosting.module - Implementation of hook_menu_alter().
File
- ./
hosting.module, line 170 - Hosting module.
Code
function hosting_menu_access($type, $feature) {
global $user;
return ($user->uid == 1 || user_access('create ' . $type)) && hosting_feature($feature) != HOSTING_FEATURE_DISABLED;
}