Priority -1000 for WordPress Hooks, Actions and Filters

I recently came across some code which set the priority parameter for an add_action() call to -1000.

I’d never seen a negative number, or such a large number used for a WordPress action or filter’s priority. Turns out, it’s actually necessary to use such a value to run a callback before anything else. Which is essential to translate a plugin’s description on the manage plugins page.

Here’s the offending snippet I received as a patch to the Social Connect plugin:

 function sc_social_connect_l10n() {
 $plugin_dir = basename( dirname( __FILE__ ) );
 load_plugin_textdomain( 'social_connect', null, "$plugin_dir/languages" );
 add_action( 'init', 'sc_social_connect_l10n', -1000 );

I was a little wary of such a priority value because a Google on the subject turned up nothing. Having spoken to a few other WordPress developers, it seems to be perfectly legitimate, so I hope this post will put others with concerns at ease.

Posted in Blogdex, WordPress | Tagged , , , | 2 Comments

5 Awesome Companies That Emerged From Crappy Ideas

5 Awesome Companies That Emerged From Crappy Ideas. »

A great reminder that a key ingredient for startup success is to be flexible.

On my primary product, I’ve made 2 major pivots in 4 months. I’m learning to focus on solving the problem rather than implementing any one solution.

It’s hard. We become invested in the big idea. Doing so prevents us listening to the subtle signals the market sends.

The flip-side is that every solution will have its detractors. I think a real talent (that I’m yet to acquire) is knowing when to take on feedback and when to ignore it.

Posted in Aside, Hacker Tales | Tagged , | Comments Off on 5 Awesome Companies That Emerged From Crappy Ideas

Git to SVN: Automated WordPress Plugin Deployment

During my daily commutes through Version Control land, I’d gladly never leave Git’s bountiful pastures. Alas, to deploy my WordPress plugins, I must check-in my code to a Subversion repository on

There are a few tutorials floating around the web which help we laymen understand how to make Git & Subversion play nice together. With my number of plugins increasing and having previously worked for an automated build tool developer, I knew I should aspire to one-step deployment.

A quick Google on the matter lead me to Dean Clatworthy’s WordPress Git-SVN Deployment script, which was a great start. Only one problem – it required I keep a copy of the SVN repo locally. I didn’t want to do that – I change computers more often than I change socks.

I also wanted the deployment script to live in each of my plugin’s Git repos (without deploying the script file and GitHub to So I made a few modifications and thus was born my one-step Git to SVN WordPress Plugin Deployment Script.

To use it, add to the root of your Plugin’s Git repository. Specify a few plugin specific variables at the beginning of the file, then it’s ready to run. Make sure it’s executable (chmod u+x and from the command line, you can deploy anytime with:


If you’re not already using an automated deployment for your WordPress plugins I highly recommend it. Since running the script for my plugins, I’ve not suffered the frustrations of minor errors – like having version numbers in the readme.txt & plugin file differ. I’ve lost less time deploying, so I’ve released more frequently, which means fewer bugs in the wild. Win.

Posted in Blogdex, WordPress | Tagged , , , , , | 56 Comments

Reflections on Wikileaks, Spycatcher and Freedom of the Press

The High Court was very clear in declaring that an Australian Court should not act “to protect the intelligence secrets and confidential political information” of a foreign government …

via Reflections on Wikileaks, Spycatcher and Freedom of the Press – speech given to Sydney University Law School 31 March 2011 | Malcolm Turnbull.

Turnball represents a growing constituency in Australia which neither of the major parties currently represent – economic conservative, socially liberal.

I really look forward to the election where Turnbull is the leader of the Libs (or of a new political party). It will be the first election in my voting lifetime with a party lead by someone I actually want as my Prime Minister.

Posted in Aside, Navel Gazing | Tagged , , | 2 Comments

Proposal: an Open-Source Zaarly Clone in Node.js

I want to use Zaarly. But I know it won’t come to Australia any time soon.

I want to learn node.js. But to really learn it, I have to build something in it.

This is the type of coincidence of wants that fuels open source. And I think an open source Zaarly clone would be totally gnarly. So here’s the pitch.


A proximity based, real-time node.js app. Released free and open source, so hackers everywhere can create one of these frictionless, buyer driven marketplaces for their city – without waiting for Zaarly to come knocking. It takes a lot more than code to build a marketplace, but it’s a start.

I’d love to see it powered by Twitter, so anyone can tweet: “I’d pay $___ for ___________ @local_clone” and voilà, the app picks up the tweet, takes its location, publishes the request and works some other magic. But that’s all the specifics which will work out in the curly braces.


Because I want a Zaarly in my city, and I know they’ve got a lot bigger fish to fry before they bring it down under. And I think there are thousands of cities in the same boat.

Open source is the ideal model, because this whole distributed, real-time networks thing has a greater capacity for distributing geography-coupled apps around the world faster than a central firm.

But mostly because I think it would be fun to build.


48 hour hackathon? TBA

Posted in Hacker Tales, Marketplaces | Tagged , , , | 4 Comments

WordPress Admin Page Template for Balsamiq Mockups

I put the word out on Twitter for some Balsamiq Mockup templates for WordPress Admin Pages.

Within minutes, I had some great replies, including one from Balsamiq, which I’m recording here for posterity & to share some Google juice:

Special thanks to Shane & Peter for these awesome templates.

Posted in WordPress | Tagged , , , | 2 Comments