Mar 12 2008

Semantic Classes plugin for Wordpress

My Post Classes plugin from yesterday has morphed into the much fuller Semantic Classes plugin. For a full description/documentation, see its project page.

In brief, the plugin is a combination of modified code from Scott Wallick’s Sandbox and some coding of my own. It seeks to bring Sandbox’s wonderful semantic class generation into plugin form, where it can be easily included in other themes by means of a template tag.

As of v0.2, it provides the following functions:

Posts
Return a post’s categories with a modifiable prefix
Return a post’s tags with a modifiable prefix
Return a post’s author with a modifiable prefix
Return a post’s date elements (year, month, day, hour) with modifiable prefixes
Body
Return a body’s type(s); e.g. ’single’ or ‘archive’ or ‘home’
Return a body’s date elements with modifiable prefixes; associated dates for entries with date data (see documentation) and current date for searches, home, etc.
Comments
Return a comment’s metadata; e.g. differentiate site users, post author
Return a comment’s date elements with modifiable prefixes
Return an ‘alt’ class for alternating comments

If you’re interested, give it a whirl. I’m no experienced plugin writer, but I’m pretty pleased with this.

Trackback URI Comments RSS

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite="" title=""> <code> <em> <i> <img alt="" src=""> <li> <ol> <p> <span> <strike> <strong> <ul>