Another itch scratched, I would like to introduce a really simple Open Graph plugin for WordPress.

This plugin adds open graph headers to posts and pages on a per post basis.

It has no native interface, instead it listens out for og:* headers as input in the Custom Fields section of WordPress’ edit page and adds the ones it recognises to the page header as meta tags.

Once installed you will be able to add the following tags to posts:

  • og:title (defaults to page title)
  • og:type (defaults to “article”)
  • og:image (URL, no default)
  • og:url is also used, but this is automatically filled in

I wrote this in about an hour so it isn’t all that fancy, and was designed to solve a specific problem for me. Hopefully it’ll be useful to someone else out there.

Feel free to leave comments and send in any patches!

» Plugin page on Github

Its almost Christmas, and I’m all excited by the prospect of kicking back and relaxing for a few days with friends and family.

…not to mention eating all the delightful food, whose impact on my waistline I shall no doubt be tackling well into February!

Its been a busy year both in my personal and professional life (my traditional new years post will no doubt follow sometime in March), but I would like to take the opportunity to point out that I am available to hire for project work.

Give me a nudge if you would like to talk!

Anyway… nothing more remains but to wish you all a very merry Christmas and an awesome 2012!

Building on what I was talking about last week, I’ve spent a little time tidying up and genericising the simple regression test framework I often find myself using and have open sourced it over on Github.

So without further ado, I’d like to introduce the Really Simple Test Framework!

This is a PHP command line application, so you’ll need the php5-cli module installed.

Usage

php test.php [-p path/to/tests] [-t HelloWorldTest]

So for example, to run all the tests in the sub directory /tests/

php test.php

To specify another directory to look in for tests

php test.php -p /path/to/my/tests

To run a specific test only, specify it by its CLASS NAME

php test.php -t MyClassTest

You can specify multiple tests to run…

php test.php -t MyClassTest -t AnotherTest

Have a butchers at the README.txt for more details on writing your own tests!

» Github Project Page