I’ve been writing WordPress themes for these past two years. Some of them are very simple and some others are quite complex. These themes need a settings panel so the user (or the site admin) can configure their site comfortably. There are many methods around the interwebs on how you can create such a settings panel for your theme/plugin. I tried to adapt some of them into my themes, but there was always something wishpering in my ear telling me to write my own settings panel with my own way :) .
The closest thing I found was the method used by Hybrid, Justin Tadlock‘s very powerful theme framework. However, it lacks some features I need, and it’s not too comfortable to work with. I like the way it uses the metaboxes to present the options though, it’s very WordPress :)
So I began playing with Hybrid’s code and altered the way it handles the options, but keep the presentation intact. I got it working the way I wanted it to, until I need to add another feature (other option type and validation). I came across Otto’s article about WordPress’ Setting API and it inspired to rewrite the code.
After a few fun days, I finally got it right and made it as a plugin so everyone can use it in their project. It still lacks some features (like file upload), but (I think) the base code is easy enough to modify so it won’t take long before I add them :)
For you WordPress lovers out there, here I present my very first public plugin, KC Settings.
This plugin is now hosted at WordPress plugins directory.
I’ve included a readme.html file so you should read it before using the plugin. The documentation is not complete yet, but should be enough to get you started. Any questions, bug reports, please feel free to contact me.