You are here

function scheduler_set_target in Scheduler 6

Mapping callback for feeds module.

This callback converts input from parser and converts it to timestamp form. After that it sets value of correct field of node.

1 string reference to 'scheduler_set_target'
scheduler_feeds_node_processor_targets_alter in ./scheduler.module
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 1027

Code

function scheduler_set_target($node, $target, $value) {
  if (!is_array($value)) {
    $timestamp = strtotime($value);

    // if strtotime returned correct timestamp, we proceed with
    // processing. Otherwise do nothing..
    if ($timestamp !== FALSE && $timestamp != -1) {
      $node->{$target} = $timestamp;
    }
  }
}