WordPress Settings Form Helper

Monday, Sep 12, 2011 4:36 pm
William Barnes

I am currently writing my first WordPress plugin. I attempted to use the Settings API on my plugin’s settings page, but found it was a little cumbersome. So I wrote a helper to cut down the number of functions I needed to define. My plan was originally to simply automate the API calls, but it quickly outgrew the Settings API and does quite a bit more. I am posting it, hoping that it will be of use to some other plugin developers. The class handles form creation, display of options, security (wpnonce, back-end validation), and storage.

Read the rest of this entry »

Settling in nicely

Thursday, Jun 26, 2008 8:32 pm
William Barnes

[Note: I’m writing this more to remind myself why I’m sticking with WP rather than because I think any of my potential readers will enjoy it.]

I briefly flirted with Movable Type and decided it wasn’t quite for me (but not before wasting a few hours learning its template system and porting my design). The move was mainly because I prefer to write my posts in Textile rather than the (horrible) WYSIWYG editor that comes with WordPress.

However, MT has a number of drawbacks. The main one is that it publishes posts statically. At first I thought that seemed like a great idea. It surely would save on the processing power required to serve pages. However, this limits what can be done with a layout. Since the sidebar is hard-coded into a post, it either cannot contain dynamic items like a list of recent posts or comments, or it must be rebuilt every time you post something. It was reasonably fast when I was testing it, but I can imagine that it would slow down noticeably over time. Its template system is complicated and spaghetti-like. I felt like I was doing something wrong every time I made a change (and then of course, I had to rebuild the entire site).

Following this interlude, I switched back to WordPress to see if I could make it work the way I want. I was able to find a working Textile plugin and shut off the WYSIWYG editor. And I found a quite passable Flickr photo importer (which means I don’t have to use WP’s clunky file manager).

So I think I’m back to WordPress for good now. Here’s hoping.