Hello,

I'm trying to delete a content type programmatically from a custom module instead of deleting it from the admin/content/types and clicking on the delete link for a given content type.

I found that running the function node_type_delete('content_type'); and although it works to remove the content type from the system, the content type is still being displayed in the menu when click on "Create Content".

Thanks for your help,

Comments

rogueturnip’s picture

I'm seeing this also with CCK 6.x-3. Funny thing after I remove it manually the custom module no longer will create the node type when it's reinstalled.

Any solutions yet?

ifuyivara’s picture

Did you try calling node_types_rebuild() after you remove the content type?