function hosting_site_client_list_block_visibility in Hosting 7.4
Same name and namespace in other branches
- 6.2 site/hosting_site.module \hosting_site_client_list_block_visibility()
- 7.3 site/hosting_site.module \hosting_site_client_list_block_visibility()
Control block visibility.
File
- site/
hosting_site.module, line 758 - Contains hook implementations for Hosting site module.
Code
function hosting_site_client_list_block_visibility() {
global $user;
$node = menu_get_object();
$menu_item = menu_get_item();
if (!empty($node) && $menu_item['number_parts'] == 2) {
return $node->type == 'client' && !user_access('administer clients', $user);
}
return FALSE;
}