svn spelunking

As I sit here blaming code to find the original source of a line of code I’m beginning to think that svn needs a new improved version of blame called spelunk it would work something like this:

$ svn help spelunk

spelunk (curse, showup, show): Output the content of specified files or URLs with the original revision and author information in-line ignoring white space changes and following movement of code between files.

Yes – I know I am dreaming 😉


Understanding complex RegEx

I’ve been wondering for a while if there was a good way of reverse engineering the meaning/function from a complex Regular Expression pattern such as the one used in the make_clickable function in WordPress.  This morning while debugging an issue with this function causing occasional segfaults in php I started searching around for a suitable tool and found YAPE::Regex::Explain to be the only reasonable solution.

Read the rest of this entry »

Tags: , ,

Always show admin bar

I like the admin bar that we are adding in the soon to be released WordPress 3.1 so much that I wanted it to always show on my site.  This way you get an easy to use search box on every page even when logged out.

I wrote a quick plugin file which I dropped into the wp-content/mu-plugins folder on this site. Here is the code I used in case you want to do the same:

function pjw_login_adminbar( $wp_admin_bar) {
 if ( !is_user_logged_in() )
 $wp_admin_bar->add_menu( array( 'title' => __( 'Log In' ), 'href' => wp_login_url() ) );
add_action( 'admin_bar_menu', 'pjw_login_adminbar' );
add_filter( 'show_admin_bar', '__return_true' , 1000 );

As you can see to make it even more useful I’ve added a Log In link so I can use it to log in to the site.

As with anything else to do with the Admin bar this code requires WordPress 3.1 to work.

Switching from Manual to Automattic

Over the past few years I have been an active member of the community in my spare time whilst having a day job which was completely unrelated to WordPress.  I have found it a useful learning experience, gaining knowledge from all the smart people we have in the community and have also found it rewarding to help people realise their full potential.

This level of enjoyment has led me to consider at a number of points in time whether or not I should switch job and work full-time on as a freelance consultant or as an Automattician.  In the end it felt like the right thing for me to do was to apply to be an Automattician.  This will hopefully ensure that I have a dependable long-term income stream and the ability to spend my spare time on the things I love: Music, Photography, Food, and of course WordPress.

It is with great pleasure that I am therefore able to reveal that I will soon be switching and starting a full-time job working for Automattic as a “Happiness Gardener”.

So what does this mean, I hear you cry?  Well to me it means a number of things:

First of all I will be getting to work with the fantastic team at Automattic on a daily basis and helping the Happiness Engineers to improve the tools they have, and the experience bloggers have, by working to remove some of the issues which are a frequent source of support tickets.

Secondly this means that I will have an easier time structuring my work around contributing to the core of  In the short-term my availability to work on may be reduced solely because there are a lot of things the Happiness Engineers would like me to do to make it easier for them to ensure that all of the bloggers on are as happy as they could be.  In the long-term I hope to be able to spend some of my work time working on and helping Automattic give back to the community even more than it already does.

Thirdly it means that I might be able to attend a few more WordCamps in order to listen to community feedback in person and answer questions on both and  I am certainly not going to stop listening to the feedback from the community at large or focus my contributions on things which Automattic want to be done.  I think one of the most positive things about is that it is a meritocracy and everyone can play a part, my new job will not change my attitude or contributions.  I want the community to continue to grow organically as it has over the past years, and together we can all ensure that continues to be the simplest and most beautiful open-source online publishing platform.

go to dashboard
go to login
show/hide help
edit post/page
comment on post/page
go to moderate comments
Skip to toolbar