I’ve converted most of the Post Avatar plugin into a class and added hooks for certain areas: the options screen and the write screen. My goal for this rewrite is extensibility. This idea is coming up more and more in WordPress land, particularly in themes, so I think plugins (which extend WordPress themselves) can do more for integrating with one another.
For Post Avatar what I want from the plugin is to simply choose from a library of existing images. Last year I rewrote the plugin from scratch to take into account: image uploads, tagging and a whole slew of features. It worked but I wasn’t completely happy with it and I felt it was taking away from what I originally designed Post Avatar for.
This time when I do put in uploading capabilities, user-centric post avatars and the like I’m going to be exploring methods of taking advantage of WordPress’s table structure and api.
Going back to this rewrite. The code is mostly ready – I’ll be releasing it for beta testing in a week or so.
I’ve been experimenting with Theme Frameworks and this design makes use of Ian Stewart’s Thematic. Aside from providing a number of widget-ready areas, it has a number of post and body clases that help to make a theme more unique in terms of content placement and styling. But what is most impressive are the hooks and filters that make it easier to customize themes through functions.
My goal for this exercise was to see if it was possible to create a child theme that consisted only of the images folder, a stylesheet and custom functions. Here I only added 3 template files for the following reasons:
- archives.php ~ I wanted to include tag listing as part of the archive
- comments.php ~ I want to customize the comment form further
- sidebar.php ~ I want to have a different sidebars depending on the location: pages will have a different sidebar from the index pages or the archives page
But everything else was done with custom functions – the different layouts for the first post and subsequent posts as well as the category display.
I’ve still got a bit left to finish – adding more content areas, playing around with font colors and deciding what to place in the sidebars – but I’m really pleased with how everything has turned out.