function node_object_prepare in Drupal 5
Same name and namespace in other branches
- 4 modules/node.module \node_object_prepare()
- 6 modules/node/node.pages.inc \node_object_prepare()
- 7 modules/node/node.module \node_object_prepare()
1 call to node_object_prepare()
- node_form in modules/
node/ node.module - Generate the node add/edit form array.
File
- modules/
node/ node.module, line 2056 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_object_prepare(&$node) {
// Set up default values, if required.
if (!isset($node->created)) {
$node->created = time();
}
if (!isset($node->date)) {
$node->date = format_date($node->created, 'custom', 'Y-m-d H:i:s O');
}
node_invoke($node, 'prepare');
node_invoke_nodeapi($node, 'prepare');
}