function workbench_moderation_node_live_load in Workbench Moderation 7
Same name and namespace in other branches
- 7.3 workbench_moderation.module \workbench_moderation_node_live_load()
Utility function to load the live revision of a node.
This is encapsulated so that changes to how the moderation data is stored will not impact the API.
Parameters
$node: The node being acted upon.
Return value
The node object of the live revision.
1 call to workbench_moderation_node_live_load()
- workbench_moderation_store in ./
workbench_moderation.module - Shutdown callback for saving a node revision.
File
- ./
workbench_moderation.module, line 1279 - Content moderation for Workbench.
Code
function workbench_moderation_node_live_load($node) {
// Is there a live revision of this node?
if (isset($node->workbench_moderation['published']->vid)) {
return node_load($node->nid, $node->workbench_moderation['published']->vid);
}
}