function node_forms

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/node/node.module \node_forms()

Implements hook_forms().

All node forms share the same form handler.

Archivo

drupal-7.x/modules/node/node.module, line 3756
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Código

function node_forms() {
  $forms = array();
  if ($types = node_type_get_types()) {
    foreach (array_keys($types) as $type) {
      $forms[$type . '_node_form']['callback'] = 'node_form';
    }
  }
  return $forms;
}