You are here

function uc_catalog_pathauto in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_catalog/uc_catalog.module \uc_catalog_pathauto()
  2. 7.3 uc_catalog/uc_catalog.pathauto.inc \uc_catalog_pathauto()

File

uc_catalog/uc_catalog.module, line 408
Übercart Catalog module.

Code

function uc_catalog_pathauto($op) {
  switch ($op) {
    case 'settings':
      $settings = array();
      $settings['module'] = 'uc_catalog';
      $settings['token_type'] = 'taxonomy';
      $settings['groupheader'] = t('Catalog path settings');
      $settings['patterndescr'] = t('Pattern for catalog pages');
      $settings['patterndefault'] = t('catalog/[catpath-raw]');
      $patterns = token_get_list('taxonomy');
      foreach ($patterns as $type => $pattern_set) {
        if ($type != 'global') {
          foreach ($pattern_set as $pattern => $description) {
            $settings['placeholders']['[' . $pattern . ']'] = $description;
          }
        }
      }
      $settings['supportsfeeds'] = '0/feed';
      $settings['bulkname'] = t('Bulk generate aliases for catalog pages that are not aliased');
      $settings['bulkdescr'] = t('Generate aliases for all existing catalog pages which do not already have aliases. Note: Bulk Update may not complete on large or slow sites. See the README.txt for more information.');
      return (object) $settings;
  }
}