You are here

function webform_menu_load in Webform 7.3

Same name and namespace in other branches
  1. 6.3 webform.module \webform_menu_load()
  2. 6.2 webform.module \webform_menu_load()
  3. 7.4 webform.module \webform_menu_load()

Menu loader callback. Load a webform node if the given nid is a webform.

File

./webform.module, line 357
This module provides a simple way to create forms and questionnaires.

Code

function webform_menu_load($nid) {
  if (!is_numeric($nid)) {
    return FALSE;
  }
  $node = node_load($nid);
  if (!isset($node->type) || !in_array($node->type, webform_variable_get('webform_node_types'))) {
    return FALSE;
  }
  return $node;
}