function node_page_disable_menu_alter in Node Page Disable 6
Same name and namespace in other branches
- 7 node_page_disable.module \node_page_disable_menu_alter()
Implements hook_menu_alter().
File
- ./
node_page_disable.module, line 18 - The main module file
Code
function node_page_disable_menu_alter(&$items) {
global $_node_page_disable_restore_path_node_;
if (empty($_node_page_disable_restore_path_node_) && isset($items['node']) && !($keep = variable_get('node_page_disable_path_node_keep', NODE_PAGE_DISABLE_DEFAULT))) {
$frontpage = variable_get('site_frontpage', '');
if (!empty($frontpage) && $frontpage != 'node') {
unset($items['node']);
}
}
}