1 node.types.inc node_node_type_load(&$types)

Implements hook_node_type_load().

File

core/modules/node/node.types.inc, line 765
Content type editing user interface.

Code

function node_node_type_load(&$types) {
  foreach ($types as $type_name => $type) {
    $types[$type_name]->settings += array(
      // Basic workflow settings.
      'status_default' => NODE_PUBLISHED,
      'scheduling_enabled' => TRUE,
      'promote_enabled' => TRUE,
      'promote_default' => FALSE,
      'sticky_enabled' => TRUE,
      'sticky_default' => FALSE,
      'revision_enabled' => TRUE,
      'revision_default' => FALSE,
      'node_preview' => TRUE,

      // Submitted information.
      'node_submitted' => TRUE,
      'node_submitted_format' => t('[node:created:medium] by [node:author]'),
      'node_user_picture' => TRUE,

      // Setting to prevent page from being accessed directly.
      'hidden_path' => FALSE,

      // Though Language module is required to change this setting, all node
      // types have a language setting, even if it is disabled by default.
      'language' => 0,

      // Enable permissions for this node type.
      // See node_permissions_get_configured_types().
      'node_permissions' => TRUE,
    );

    // Ensure Boolean statuses are converted to use the node (integer) constants
    // of NODE_PUBLISHED and NODE_NOT_PUBLISHED.
    if (isset($type->settings['status_default'])) {
      $types[$type_name]->settings['status_default'] = (int) $type->settings['status_default'];
    }
  }

}