function revisioning_scheduler_revisionapi in Revisioning 8
Same name and namespace in other branches
- 6.3 revisioning_scheduler/revisioning_scheduler.module \revisioning_scheduler_revisionapi()
- 7 revisioning_scheduler/revisioning_scheduler.module \revisioning_scheduler_revisionapi()
Implements hook_revisionapi().
See also
revisioning/revisioning_api.inc
File
- revisioning_scheduler/
revisioning_scheduler.module, line 230 - Allows revisions to be published at specified dates and times.
Code
function revisioning_scheduler_revisionapi($op, $node) {
switch ($op) {
case 'pre publish':
case 'post revert':
if (empty($_POST['revisioning_scheduler_date'])) {
break;
}
$date = check_plain($_POST['revisioning_scheduler_date']);
$time = check_plain($_POST['revisioning_scheduler_time']);
$result = _revisioning_scheduler_schedule_publication($date, $time, $node);
if (isset($result)) {
// This will abort the current publication operation.
return FALSE;
}
break;
}
}