[wp-hackers] Custom Post Types and pending incompatibilities

Peter Westwood peter.westwood at ftwr.co.uk
Mon Jul 12 20:24:13 UTC 2010

I've read through the whole thread and he are my comments.

Personally I would recommend against people "reserving" post types - you are creating mines in which your data will be stored which won't make it easy for other plugins or themes to interact with without breaking arbitrary rules:

"like custom post types must be prefixed in a plugin specific way"

I would rather recommend that if you are creating a plugin which allows people to create "Events" you use a post type called "event" and you write your code in such a way that if some special piece of post_meta you need is missing you have a default for it which you use.

That way when I decide to switch from your Events plugin to this new kid on the block I can still manage and use all those events I already created using the new plugin.

Basically a plugin using Custom Post Types should follow Postel's Law: 

"be conservative in what you do, be liberal in what you accept from others"

I think that it is better for the community and the users in general if it is easy for people to switch between plugins which compete in the same space rather than difficult because they have stored the data slightly differently after all this is why we have custom post types instead of each plugin creating it's own tables.

Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5

More information about the wp-hackers mailing list