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
<?php
function node_object_prepare(&$node) {
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');
}
?>
Login or
register to post comments