| Versionen | |
|---|---|
| drupal7 | hook_node_prepare($node) |
The node is about to be shown on the add/edit form.
$node The node the action is being performed on.
None.
modules/
<?php
function hook_node_prepare($node) {
if (!isset($node->comment)) {
$node->comment = variable_get("comment_$node->type", COMMENT_NODE_OPEN);
}
}
?>
Kommentare
Kommentar hinzufügen