function themekey_redirect_menu in ThemeKey 7.3
Implements hook_menu().
File
- themekey_redirect/
themekey_redirect.module, line 48 - Define rules to redirect the user to a different domain. The common use-case is to setup sub-domains for mobile sites. In this case you can configure ThemeKey Redirect to detect mobile clients and redirect the user accordingly. In ThemeKey itself you…
Code
function themekey_redirect_menu() {
$items = array();
$items['admin/config/user-interface/themekey/redirects'] = array(
'title' => 'Redirecting Rule Chain',
'description' => 'Set up rules to redirect the user, depending on Drupal paths or different properties.',
'access callback' => 'user_access',
'access arguments' => array(
'administer theme assignments',
),
'file' => 'themekey_redirect_admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'themekey_redirect_rule_chain_form',
),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/config/user-interface/themekey/redirects/delete'] = array(
'title' => 'Delete ThemeKey Redirect Rule',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'themekey_redirect_admin_delete_rule_confirm',
1,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer theme assignments',
),
'file' => 'themekey_redirect_admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/config/user-interface/themekey/settings/redirects'] = array(
'title' => 'Redirect',
'access callback' => 'user_access',
'access arguments' => array(
'administer themekey settings',
),
'file' => 'themekey_redirect_admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'themekey_redirect_settings_form',
),
'type' => MENU_LOCAL_TASK,
'weight' => 9,
);
$items['themekey/redirect_callback'] = array(
'title' => 'ThemeKey Redirect Callback',
'page callback' => 'themekey_redirect_callback',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
'delivery callback' => 'drupal_json_output',
);
return $items;
}