daily_prepare

Definition

daily_prepare(&$node)
daily/daily_container.inc, line 133

Description

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.

Related topics

Namesort iconDescription
Daily Container node type functionsAll functions which define the node type Daily Container.
Hook implementationsFunctions that implement standard Drupal hooks.

Code

<?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;
  }
}
?>