daily_prepare(&$node)
daily/daily_container.inc, line 133
Implementation of hook_prepare(): Prepare a node for editing
This is always called for Daily Container nodes when starting a new node, when editing an existing node, when previewing a node and when submitting a node.
We only do a few sanity checks here.
| Name | Description |
|---|---|
| Daily Container node type functions | All functions which define the node type Daily Container. |
| Hook implementations | Functions that implement standard Drupal hooks. |
<?php
function daily_prepare(&$node) {
if (!module_exists("taxonomy")) {
form_set_error('fatal', _daily_form_error_no_taxonomy());
return;
}
$vid = variable_get("daily_vocabulary", 0);
if (!$vid) {
form_set_error('fatal', _daily_form_error_no_vocabulary());
return;
}
}
?>