You are here

function workbench_access_mass_update in Workbench Access 7

Mass update callback for hook_node_operations().

Parameters

$nodes: The nodes to be edited.

$access_id: The new access id to set.

$access_scheme: An array representing the active access scheme.

1 string reference to 'workbench_access_mass_update'
workbench_access_node_operations in ./workbench_access.module
Implements hook_node_operations().

File

./workbench_access.module, line 1958
Workbench Access module file.

Code

function workbench_access_mass_update($nodes, $access_id, $access_scheme) {
  foreach ($nodes as $nid) {
    $data = array(
      'nid' => $nid,
      'workbench_access' => $access_id,
    );
    $node = (object) $data;
    workbench_access_node_update($node);
  }
  drupal_set_message(t('Editorial sections have been updated.'));
}