You are here

function _scheduler_scheduler_api in Scheduler 7

Same name and namespace in other branches
  1. 5 scheduler.module \_scheduler_scheduler_api()
  2. 6 scheduler.module \_scheduler_scheduler_api()

Scheduler API to perform actions when nodes are (un)published.

This allows other modules to implement hook_scheduler_api($node, $action).

Parameters

object $node: The node object.

string $action: The action being performed, either 'pre_publish', 'publish', 'publish_immediately', 'pre_unpublish' or 'unpublish'.

3 calls to _scheduler_scheduler_api()
scheduler_node_presave in ./scheduler.module
Implements hook_node_presave().
_scheduler_publish in ./scheduler.cron.inc
Publish scheduled nodes.
_scheduler_unpublish in ./scheduler.cron.inc
Unpublish scheduled nodes.

File

./scheduler.module, line 772
Scheduler publishes and unpublishes nodes on dates specified by the user.

Code

function _scheduler_scheduler_api($node, $action) {
  foreach (module_implements('scheduler_api') as $module) {
    $function = $module . '_scheduler_api';
    $function($node, $action);
  }
}