You are here

function customerror_menu in Customerror 5

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

File

./customerror.module, line 116
Enables custom 404 (not found) and 403 (access denied) pages in Drupal with no need for creating real nodes under taxonomies

Code

function customerror_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/customerror',
      'title' => t('Custom error'),
      'description' => t('Administer custom error.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'customerror_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'title' => t('customerror'),
      'path' => 'customerror',
      'access' => TRUE,
      'callback' => 'customerror_page',
      'type' => MENU_CALLBACK,
      'weight' => 0,
    );
  }
  return $items;
}