I have created a new node type using a custom module on Drupal 7. However when I check the content type under the structure menu item it isn't listed. Looking in the node_type table, I see that it is listed as disabled. My question is how do I get the content type to be enabled?
Here is my content type creation function located in mymodule.install file:
// define the node type
$type = array(
'type' => $machine_name,
'name' => $t($parameters['name']),
'base' => 'room_reservations',
'module' => 'room_reservations',
'description' => $t($parameters['description']),
'has_title' => TRUE,
'title_label' => $t($parameters['title_label']),
'custom' => FALSE,
'locked' => TRUE,
'disabled' => FALSE,
);
// set other node defaults not declared above
$content_type = node_type_set_defaults($type);
// add the body field
node_add_body_field($content_type, $t($parameters['body_label']));
// save the content type
node_type_save($content_type);
I believe this is correct but it obviously doesn't work. Any ideas