function scheduler_feeds_node_processor_targets_alter in Scheduler 6
Implementation of hook_feeds_node_processor_targets_alter(). advertises publish_on and unpublish_on as mappable values to the feeds module
File
- ./
scheduler.module, line 998
Code
function scheduler_feeds_node_processor_targets_alter(&$targets, $content_type) {
$target = array();
$publishing_enabled = variable_get('scheduler_publish_enable_' . $content_type, 0) == 1;
$unpublishing_enabled = variable_get('scheduler_unpublish_enable_' . $content_type, 0) == 1;
if ($publishing_enabled) {
$targets['publish_on'] = array(
'name' => t('Scheduler: publish on'),
'description' => t('The date, when scheduler module should publish node.'),
'callback' => 'scheduler_set_target',
);
}
if ($unpublishing_enabled) {
$targets['unpublish_on'] = array(
'name' => t('Scheduler: unpublish on'),
'description' => t('The date, when scheduler module should unpublish node.'),
'callback' => 'scheduler_set_target',
);
}
return $targets;
}