You are here

function blog_pathauto in Pathauto 5.2

Same name and namespace in other branches
  1. 5 pathauto_user.inc \blog_pathauto()
  2. 6.2 pathauto.module \blog_pathauto()
  3. 6 pathauto_user.inc \blog_pathauto()
  4. 7 pathauto.module \blog_pathauto()

Implementation of hook_pathauto() for blog aliases.

File

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

Code

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