You are here

function themekey_menu in ThemeKey 7

Same name and namespace in other branches
  1. 6.4 themekey.module \themekey_menu()
  2. 6 themekey.module \themekey_menu()
  3. 6.2 themekey.module \themekey_menu()
  4. 6.3 themekey.module \themekey_menu()
  5. 7.3 themekey.module \themekey_menu()
  6. 7.2 themekey.module \themekey_menu()

Implements hook_menu().

File

./themekey.module, line 62
ThemeKey is designed as a generic theme-switching module.

Code

function themekey_menu() {
  $items = array();
  $items['admin/config/user-interface/themekey'] = array(
    'title' => 'ThemeKey',
    'description' => 'Set up rules to switch the site\'s appearance (theme) dynamically, depending on Drupal paths or different properties.',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer theme assignments',
    ),
    'file' => 'themekey_admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'themekey_rule_chain_form',
    ),
  );
  $items['admin/config/user-interface/themekey/properties'] = array(
    'title' => 'Theme Switching Rule Chain',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  $items['admin/config/user-interface/themekey/properties/delete'] = array(
    'title' => 'Delete ThemeKey Property',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'themekey_admin_delete_rule_confirm',
      1,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer theme assignments',
    ),
    'file' => 'themekey_admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/user-interface/themekey/settings'] = array(
    'title' => 'Settings',
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer themekey settings',
    ),
    'file' => 'themekey_admin.inc',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'themekey_settings_form',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
  );
  $items['admin/config/user-interface/themekey/settings/general'] = array(
    'title' => 'General',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  );
  return $items;
}