My module adds content types by implementing hook_node_info
. After disabling and uninstalling the module, the content type is still in the database and is merely marked as disabled.
NOTE: I also add create and instantiate custom fields for the created content type.
Since according to this answer content types created in hook_node_info
are deleted automatically, is my problem a sign if DB inconsistency or am I doing something else wrong.
Code:
function test_core_node_info() {
// Name of the proper localization function
$t = get_t ();
// Adding author
return array (
'test' => array (
'name' => $t ( 'Test' ),
'base' => 'test_module',
'description' => $t ( 'Test' ),
'title_label' => $t ( 'Title' ),
'locked' => TRUE
)
);
}
-- EDIT --
I mentioned removing instead of uninstalling. This is corrected now.
hook_uninstall
I just remove the custom taxonomy vocabularies I added during the installation.