I’m about to embark on creating a new WP that, at the core, will rely on a custom post type. I’m building this plugin for a client, but plan to make it flexible enough to release in the future. My client has a specific need for the plugin and I ultimately want it to be flexible enough to meet the needs of many users. As such, I plan to create an admin area where a user can enter the various args that would go into the register_post_type
function. My thoughts in doing so are that the end user will be able to leverage the power of my plugin while also being able to preciously control the custom post type that the plugin generates. I like the idea of easily giving this control over to non-technical users; however, my concern is that I could invite a number of potential issues by doing so. For instance, imagine that a user uses the interface to name the custom post type “whirly-doos”, but later thinks that’s a dumb name and decides to call it “howdy-doos”. This could potentially orphan their previous custom post types.
So…my questions are: is this a good way of going about building this plugin? How would you implement the plugin and maintain a nice balance between customization and stability?
Thanks in advance!
I would not give them control over the actual name of the post type. What if they rename it to revision or attachment? Big time site wreckage potential there.
I’d say stick with the more “trivial” things; basically, only those things that don’t go into the database: labels, rewrite settings (although that could be potentially hazardous in the hands of an uneducated user), menu icon, menu position, exclude from search, and supports.
I think allowing GUI management of those things would give the user the most flexibility without compromising stability.
I guess there are already some plugins out there that do stuff like you mentioned. Here’s one example.