This is a slick idea! It's especially useful when enabling a module like comment that inserts itself into every content type until you turn it off one... by... one...
However, would it be possible to disable the "cleanup" form_alter on the node_type_form itself? I don't really see the value it adds, but it collides with form_altering that I'm doing to that form already myself. (Eg, I am removing the "promoted" checkbox entirely as it's pointless and vestigial, but this module adds it back in.)
Also, I presume the reason you're using hook_form_alter instead of hook_form_node_type_form_alter is to ensure that this module's alter runs after any others that are doing form-specific alteration. That should probably be documented inline as I was about to submit that as a bug until I realized why you must be doing it. :-)
Comments
Comment #1
wulff commentedThat makes sense. I have made the changes related to this in the latest version of the module.
1) The cleanup code no longer clobbers the node_options #options-array.
2) It is now possible to disable the cleanup completely.
I have updated the inline docs to explain why the cleanup code lives in hook_form_alter.
Comment #2
Crell commentedAwesome, thanks!