You are here

function hook_node_import_prepare in Node import 5

Hook that is called before node_validate. This allows a module to change the imported field from a user readable format to a format node_save understands.

See import_taxonomy.inc for a complex example.

Parameters

&$node: A node object which can be changed if needed.

$preview: Boolean. If TRUE this function is only run in a preview stage. The function should then avoid making permanent changes to any database table. If FALSE the function may commit permanent changes to the database that are needed to import the node.

Return value

Nothing.

16 functions implement hook_node_import_prepare()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

auto_nodetitle_node_import_prepare in supported/auto_nodetitle.inc
Implementation of hook_node_import_prepare().
book_node_import_prepare in supported/book.inc
Implementation of hook_node_import_prepare().
comment_node_import_prepare in supported/comment.inc
Implementation of hook_node_import_prepare().
content_node_import_prepare in supported/cck/content.inc
Implementation of hook_node_import_prepare().
event_node_import_prepare in supported/event.inc
Implementation of hook_node_import_prepare().

... See full list

1 invocation of hook_node_import_prepare()
_node_import_get_nodes in ./node_import.module
Import and create nodes.

File

docs/node_import_hook_docs.php, line 60
Documentation for hooks provided by the node_import module.

Code

function hook_node_import_prepare(&$node, $preview = FALSE) {

  // The story node type doesn't need any preparing.
  return;
}