You are here

function customerror_menu in Customerror 7

Same name and namespace in other branches
  1. 5 customerror.module \customerror_menu()
  2. 6 customerror.module \customerror_menu()

Implements hook_menu().

File

./customerror.module, line 151
Enables custom 404 (not found) and 403 (access denied) pages in Drupal.

Code

function customerror_menu() {
  $items = array();
  $items['admin/config/system/customerror'] = array(
    'title' => 'Custom error',
    'description' => 'Enables the creation of custom error pages for 404 and 403 errors.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'customerror_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['customerror/%'] = array(
    'title callback' => 'customerror_page_title',
    'title arguments' => array(
      1,
    ),
    'access callback' => TRUE,
    'page callback' => 'customerror_page',
    'page arguments' => array(
      1,
    ),
    'theme callback' => 'customerror_theme_callback',
    'type' => MENU_CALLBACK,
  );
  return $items;
}