You are here

function revisioning_scheduler_api in Revisioning 7

Implements hook_scheduler_api().

File

./revisioning.module, line 849
Allows content to be updated and reviewed before submitting it for publication, while the current live revision remains unchanged and publicly visible until the changes have been reviewed and found fit for publication by a moderator.

Code

function revisioning_scheduler_api($node, $action) {
  if ($action == 'pre_publish') {
    $node->scheduled_status = NODE_PUBLISHED;
  }
  elseif ($action == 'pre_unpublish') {
    $node->scheduled_status = NODE_NOT_PUBLISHED;
  }
}