function protected_pages_menu in Protected Pages 7.2
Same name and namespace in other branches
- 7 protected_pages.module \protected_pages_menu()
Implements hook_menu().
File
- ./
protected_pages.module, line 33 - This module allows you to protect any page of your website by secure password. You can enter urls of pages to protect and set password per page. Admin (uid = 1) or user with bypass protection permission can view page.
Code
function protected_pages_menu() {
$items = array();
$items['admin/config/system/protected_pages'] = array(
'title' => 'Protected Pages',
'description' => 'Configure protected pages setting.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_configure',
),
'access arguments' => array(
'administer protected pages configuration',
),
'file' => 'protected_pages.admin.inc',
);
$items['admin/config/system/protected_pages/list'] = array(
'title' => 'Protected Pages',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/config/system/protected_pages/settings'] = array(
'title' => 'Settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_settings',
),
'access arguments' => array(
'administer protected pages configuration',
),
'type' => MENU_LOCAL_TASK,
'file' => 'protected_pages.admin.inc',
);
$items['admin/config/system/protected_pages/%/edit'] = array(
'title' => 'Edit Protected Pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_edit',
4,
),
'access arguments' => array(
'administer protected pages configuration',
),
'file' => 'protected_pages.admin.inc',
);
$items['admin/config/system/protected_pages/%/delete'] = array(
'title' => 'Delete Protected Pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_delete_confirm',
4,
),
'access arguments' => array(
'administer protected pages configuration',
),
'type' => MENU_CALLBACK,
'file' => 'protected_pages.admin.inc',
);
$items['admin/config/system/protected_pages/%/send_email'] = array(
'title' => 'Send protected pages details to user by email',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_send_email',
4,
),
'access arguments' => array(
'administer protected pages configuration',
),
'file' => 'protected_pages.admin.inc',
);
$items['protected-page'] = array(
'title' => 'Protected page - Enter Password',
'title callback' => 'protected_pages_get_title',
'description' => 'Here you can enter the password for protected pages',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'protected_pages_enter_password',
),
'access callback' => 'protected_pages_access_callback',
'type' => MENU_CALLBACK,
'file' => 'protected_pages.inc',
);
return $items;
}