function hosting_menu_access in Hosting 7.4
Same name and namespace in other branches
- 6.2 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
string $type: The node type that the user wants to create.
string $feature: The machine name of the host feature that should be additionally checked to see if it's enabled.
Return value
bool TRUE if the user can access, FALSE otherwise.
1 string reference to 'hosting_menu_access'
- hosting_menu_alter in ./
hosting.module - Implements hook_menu_alter().
File
- ./
hosting.module, line 273 - 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;
}