function _node_mass_update_helper
_node_mass_update_helper($nid, $updates)
Updates individual nodes when fewer than 10 are queued.
Parameters
$nid: ID of node to update.
$updates: Associative array of updates.
Return value
object An updated node object.
See also
File
- modules/node/node.admin.inc, line 320
- Content administration and module settings UI.
Code
function _node_mass_update_helper($nid, $updates) { $node = node_load($nid, NULL, TRUE); // For efficiency manually save the original node before applying any changes. $node->original = clone $node; foreach ($updates as $name => $value) { $node->$name = $value; } node_save($node); return $node; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.admin.inc/function/_node_mass_update_helper/7.x