You are here

function contact_pathauto in Pathauto 6

Implements hook_pathauto().

File

./pathauto_user.inc, line 91
Hook implementations for user module integration.

Code

function contact_pathauto($op) {
  switch ($op) {
    case 'settings':
      $settings = array();
      $settings['module'] = 'contact';
      $settings['token_type'] = 'user';
      $settings['groupheader'] = t('User contact forms paths');
      $settings['patterndescr'] = t('Pattern for the user contact form paths');
      $settings['patterndefault'] = 'users/[user-raw]/contact';
      $patterns = token_get_list('user');
      foreach ($patterns['user'] as $pattern => $description) {
        $settings['placeholders']['[' . $pattern . ']'] = $description;
      }
      $settings['bulkname'] = t('Bulk generate aliases for user contact form paths that are not aliased');
      $settings['bulkdescr'] = t('Generate aliases for all existing user contact form pages which do not already have aliases.');
      return (object) $settings;
    default:
      break;
  }
}