I am trying to learn how to build a dynamic Custom Post Types Plugin for Wordpress, I m using this old guide:

<https://code.tutsplus.com/tutorials/building-a-dynamic-custom-post-type-plugin--wp-26322>

but I cannot get it to work correctly, I was able to create the Dynamic Custom Post Types but every time I register a new Custom Post Type the Supports section with the 'title', 'editor', 'author', etc gets changed in the Custom Post Type that was created before.

(I found this plugin that was created using the same guide but it has the same erratic behavior.

This is the plugin: <https://wordpress.org/plugins/dynamic-custom-post-type/>)

To fully explain I am getting the Field editor, author, etc. or another field every time I add or edit another Custom Post Type even if the database says that for that Custom Post Type it should be off.

Any help would be appreciated.