function hook_scheduler_nid_list_alter in Scheduler 7
Same name and namespace in other branches
- 8 scheduler.api.php \hook_scheduler_nid_list_alter()
Allows modules to add or remove node ids from the list to be processed.
Modules can implement hook_scheduler_nid_list_alter() to add or remove node ids from the list to be processed in the current cron run. This hook is invoked during cron runs only.
Parameters
array $nids: Array of node ids being processed.
string $action: Indicates what is being done to the node. The value will be 'publish' or 'unpublish'.
Return value
array The full array of node ids to process, adjusted as required.
2 invocations of hook_scheduler_nid_list_alter()
- _scheduler_publish in ./
scheduler.cron.inc - Publish scheduled nodes.
- _scheduler_unpublish in ./
scheduler.cron.inc - Unpublish scheduled nodes.
File
- ./
scheduler.api.php, line 86 - API documentation for the Scheduler module.
Code
function hook_scheduler_nid_list_alter(array &$nids, $action) {
// Do some processing to add or removed node ids from the $nids array.
return $nids;
}