function pathauto_node_update_alias_multiple in Pathauto 6
Same name and namespace in other branches
- 6.2 pathauto.module \pathauto_node_update_alias_multiple()
- 7 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').
$message: A boolean if TRUE will display a message about how many nodes were updated.
1 call to pathauto_node_update_alias_multiple()
- pathauto_node_operations_update in ./
pathauto.module - Wrapper function backwards compatibility. Should be avoided.
1 string reference to 'pathauto_node_update_alias_multiple'
- pathauto_node_operations in ./
pathauto.module - Implements hook_node_operations().
File
- ./
pathauto.module, line 443 - Main file for the Pathauto module, which automatically generates aliases for content.
Code
function pathauto_node_update_alias_multiple($nids, $op, $message = FALSE) {
foreach ($nids as $nid) {
if ($node = node_load($nid, NULL, TRUE)) {
pathauto_node_update_alias($node, $op);
}
}
if ($message) {
drupal_set_message(format_plural(count($nids), 'Updated URL alias for 1 node.', 'Updated URL aliases for @count nodes.'));
}
}