function feeds_node_insert in Feeds 8.2
Same name and namespace in other branches
- 7.2 feeds.module \feeds_node_insert()
- 7 feeds.module \feeds_node_insert()
Implements hook_node_insert().
Related topics
File
- ./
feeds.module, line 587 - Feeds - basic API functions and hook implementations.
Code
function feeds_node_insert($node) {
// Source attached to node.
feeds_node_update($node);
if (isset($node->feeds) && ($importer_id = feeds_get_importer_id($node->type))) {
$source = feeds_source($importer_id, $node->nid);
// Start import if requested.
if (feeds_importer($importer_id)->config['import_on_create'] && !isset($node->feeds['suppress_import'])) {
$source
->startImport();
}
// Schedule the source.
$source
->schedule();
}
}