You are here

function language_selection_page_menu in Language Selection Page 7.2

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

Implements hook_menu().

File

./language_selection_page.module, line 15

Code

function language_selection_page_menu() {
  $items = array();
  $items['admin/config/regional/language/configure/selection_page'] = array(
    'title' => 'Language selection page',
    'description' => 'Configure the language selection page behavior',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'language_selection_page_admin',
    ),
    'access arguments' => array(
      'administer languages',
    ),
    'file' => 'language_selection_page.admin.inc',
    'type' => MENU_VISIBLE_IN_BREADCRUMB,
  );
  if (LANGUAGE_SELECTION_PAGE_BLOCK != variable_get('language_selection_page_redirect_type', LANGUAGE_SELECTION_PAGE_TEMPLATE_ONLY)) {
    $language_selection_page_url = variable_get('language_selection_page_path', 'language_selection');
    $items[$language_selection_page_url] = array(
      'description' => 'Language selection page',
      'page callback' => 'language_selection_page_selection_page',
      'access arguments' => array(
        'access content',
      ),
      'file' => 'language_selection_page.pages.inc',
      'type' => MENU_NORMAL_ITEM,
    );
  }
  return $items;
}