function view_unpublished_menu_alter in view_unpublished 6
Implementation of hook_menu_alter().
Modifies the path node/nid to use our access callback.
File
- ./
view_unpublished.module, line 30 - Allow users to view all unpublished nodes, or unpublished nodes of a specific type.
Code
function view_unpublished_menu_alter(&$items) {
$old_access_callback = $items['node/%node']['access callback'];
$old_access_arguments = $items['node/%node']['access arguments'];
$items['node/%node']['access callback'] = '_view_unpublished_node_access';
$items['node/%node']['access arguments'] = array(
1,
$old_access_callback,
$old_access_arguments,
);
}