You are here

function path_alias_xt_admin_config in Extended Path Aliases 7

Menu callback for admin settings.

1 string reference to 'path_alias_xt_admin_config'
path_alias_xt_menu in ./path_alias_xt.module
Implements hook_menu().

File

./path_alias_xt.module, line 52
Extended Path Aliases.

Code

function path_alias_xt_admin_config() {
  $form['path_alias_xt_user_special'] = array(
    '#type' => 'checkbox',
    '#title' => t('For the current user: instead of <em>/user/uid</em> or its alias, apply the alias for <em>/user</em>.'),
    '#default_value' => variable_get('path_alias_xt_user_special', TRUE),
    '#description' => t('If ticked and the system path <em>/user</em> has an <a target="alias" href="!alias">alias</a>, such as <em>/MyAccount</em>, then <em>/MyAccount</em> will also be applied when a user visits their <em>/user/uid/...</em> pages.<br/>For this feature to work you must complete the full installation procedure outlined in the <a href="!README">README</a>.', array(
      '!alias' => url('/admin/config/search/path'),
      '!README' => url(drupal_get_path('module', 'path_alias_xt') . '/README.txt'),
    )),
  );
  $form['path_alias_xt_regex_pattern'] = array(
    '#type' => 'textfield',
    '#size' => 100,
    '#title' => t('Regular expression to match system paths for nodes, users and taxonomy terms'),
    '#default_value' => variable_get('path_alias_xt_regex_pattern', PATH_ALIAS_XT_DEFAULT_NODE_OR_USER_MATCH),
    '#description' => t("While you can always reset this configuration and recover without permanent damage to your site, a change to this expression may temporarily break all extended aliases. Change only when you know what you're doing."),
  );
  return system_settings_form($form);
}