You are here

function webform_menu_load in Webform 6.2

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

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

File

./webform.module, line 258

Code

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