You are here

function pathauto_taxonomy_term_update_alias_multiple in Pathauto 6.2

Same name and namespace in other branches
  1. 7 pathauto.module \pathauto_taxonomy_term_update_alias_multiple()

Update the URL aliases for multiple taxonomy terms.

Parameters

$tids: An array of term IDs.

$op: Operation being performed on the nodes ('insert', 'update' or 'bulkupdate').

$options: An optional array of additional options.

2 calls to pathauto_taxonomy_term_update_alias_multiple()
forum_pathauto_bulk_update_batch_process in ./pathauto.pathauto.inc
Batch processing callback; Generate aliases for forums.
taxonomy_pathauto_bulk_update_batch_process in ./pathauto.pathauto.inc
Batch processing callback; Generate aliases for taxonomy terms.

File

./pathauto.module, line 618
Main file for the Pathauto module, which automatically generates aliases for content.

Code

function pathauto_taxonomy_term_update_alias_multiple(array $tids, $op, array $options = array()) {
  $options += array(
    'message' => FALSE,
  );
  foreach ($tids as $tid) {
    if ($term = taxonomy_get_term($tid, TRUE)) {
      pathauto_taxonomy_term_update_alias($term, $op, $options);
    }
  }
  if (!empty($options['message'])) {
    drupal_set_message(format_plural(count($tids), 'Updated URL alias for 1 term.', 'Updated URL aliases for @count terms.'));
  }
}