You are here

function pathauto_taxonomy_term_update_alias_multiple in Pathauto 7

Same name and namespace in other branches
  1. 6.2 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 936
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,
  );
  $terms = taxonomy_term_load_multiple($tids);
  foreach ($terms as $term) {
    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.'));
  }
}