You are here

function protected_node_menu in Protected Node 5

Same name and namespace in other branches
  1. 6 protected_node.module \protected_node_menu()
  2. 7 protected_node.module \protected_node_menu()
  3. 1.0.x protected_node.module \protected_node_menu()

Implementation of hook_menu(). @link http://api.drupal.org/api/function/hook_menu/5

File

./protected_node.module, line 197

Code

function protected_node_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/protected_node',
      'title' => t('Protected node'),
      'description' => t('Here you change protected node settings'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'protected_node_admin_settings',
      'access' => user_access('administer site configuration'),
    );
    $items[] = array(
      'path' => 'protected-node',
      'title' => t('Protected node - Enter Password'),
      'description' => t('Here you can enter the password for the node'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'protected_node_enterpassword',
      'access' => user_access('access protected content'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}