Install, update and uninstall functions for the node_example module.
<?php /** * @file * Install, update and uninstall functions for the node_example module. */ /** * Implements hook_install(). */ function node_type_example_install() { $node_content_type = (object) array( 'type' => 'node_type_example', 'name' => t('Example content type'), 'base' => 'node_content', 'description' => t('This is an example content type with a few fields.'), 'custom' => 1, 'modified' => 1, 'locked' => 0, 'is_new' => TRUE, 'settings' => array( 'promote_enabled' => FALSE, ), ); node_type_save($content_type); node_add_body_field($content_type); }