You are here

function _uc_catalog_pathauto_alias in Ubercart 5

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

Function to create aliases for taxonomy objects

Parameters

object $category a taxonomy object:

2 calls to _uc_catalog_pathauto_alias()
uc_catalog_pathauto_bulkupdate in uc_catalog/uc_catalog.module
Generate aliases for all categories without aliases
uc_catalog_taxonomy in uc_catalog/uc_catalog.module
Implementation of hook_taxonomy().

File

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

Code

function _uc_catalog_pathauto_alias($category, $op) {
  _pathauto_include();
  $count = 0;
  $placeholders = pathauto_get_placeholders('taxonomy', $category);
  $src = uc_catalog_path($category);
  if ($alias = pathauto_create_alias('uc_catalog', $op, $placeholders, $src, $category->vid)) {
    $count++;
  }
  return $count;
}