Lovely day for a visit to the Tower of London

Saturday, 11th January 2014

BdugPC_CEAEETZT.jpg-large


previous / next_post_link() within a custom taxonomy term

Friday, 10th January 2014

Here’s a handy little patch that snuck into WordPress 3.8…

Up until now the previous_post_link() and next_post_link() WordPress functions have just had a paramter $in_same_cat which if true returns a link to the previous/next post in the same category as the current post.

In WordPress 3.8 that is now a new $taxonomy parameter which allows you to specify a custom taxonomy rather that a category. This will be immensely useful to anyone who uses custom taxonomies and custom post types.

As an example, WordPress Post Formats are actually a custom taxonomy so you could use the following code to output a link to the same post with the same post format as the current post:

<?php next_post_link( '%link', 'Next post in category', TRUE, ' ', 'post_format' ); ?>

This update affects all the following functions:

get_previous_post(), get_next_post(), get_adjacent_post(), get_adjacent_post_rel_link(), adjacent_posts_rel_link(), next_post_rel_link(), prev_post_rel_link(), get_boundary_post(), get_previous_post_link(), previous_post_link(), get_next_post_link(), next_post_link(), get_adjacent_post_link(), adjacent_post_link()

us web hosting provider since 2001

Kids in bed. Daddy fun time

Thursday, 26th December 2013

BccIWccCcAAP7rE.jpg-large


Apache 2.0 License is OK if you need to package a script with a plugin on WordPress.org

Wednesday, 4th December 2013

I was putting together a plugin recently in which I wanted to include a third party open-source JavaScript. The JavaScript was licensed as Apache 2.0 which says that it is GPL compatible.

Anyway, I reached out to @markjaquith and @Otto42 just to confirm that Apache 2.0 scripts are OK to include in the WordPress.org plugin repository, and they are…


Why no posts for over a year?

Sunday, 20th October 2013

No particularly reason… I’ve just been busy.

Here’e the Web design in Columbus GitHub proof that I’ve been tinkering away on a variety of different things. :)

github-2013