function pathauto_node_update_alias_multiple in Pathauto 7
Same name and namespace in other branches
- 6.2 pathauto.module \pathauto_node_update_alias_multiple()
- 6 pathauto.module \pathauto_node_update_alias_multiple()
Update the URL aliases for multiple nodes.
Parameters
$nids: An array of node IDs.
$op: Operation being performed on the nodes ('insert', 'update' or 'bulkupdate').
$options: An optional array of additional options.
1 call to pathauto_node_update_alias_multiple()
- node_pathauto_bulk_update_batch_process in ./
pathauto.pathauto.inc - Batch processing callback; Generate aliases for nodes.
1 string reference to 'pathauto_node_update_alias_multiple'
- pathauto_node_operations in ./
pathauto.module - Implements hook_node_operations().
File
- ./
pathauto.module, line 771 - Main file for the Pathauto module, which automatically generates aliases for content.
Code
function pathauto_node_update_alias_multiple(array $nids, $op, array $options = array()) {
$options += array(
'message' => FALSE,
);
$nodes = node_load_multiple($nids);
foreach ($nodes as $node) {
pathauto_node_update_alias($node, $op, $options);
}
if (!empty($options['message'])) {
drupal_set_message(format_plural(count($nids), 'Updated URL alias for 1 node.', 'Updated URL aliases for @count nodes.'));
}
}