function node_add
Returns a node submission form.
Parameters
$type: The node type for the submitted node.
Return value
The themed form.
1 string reference to 'node_add'
- node_menu in modules/node/ node.module 
- Implements hook_menu().
File
- 
              modules/node/ node.pages.inc, line 72 
Code
function node_add($type) {
  global $user;
  $types = node_type_get_types();
  $node = (object) array(
    'uid' => $user->uid,
    'name' => isset($user->name) ? $user->name : '',
    'type' => $type,
    'language' => LANGUAGE_NONE,
  );
  drupal_set_title(t('Create @name', array(
    '@name' => $types[$type]->name,
  )), PASS_THROUGH);
  $output = drupal_get_form($type . '_node_form', $node);
  return $output;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
