Switching Teams: A New Chapter At Automattic

Ever since I joined Automattic three and a half years ago (I can’t believe its been that long already), I’ve worked on our VIP team providing support for our VIP hosting service. This work involved answering questions from our client’s developers as well as doing reviews of all of their code to make sure it will scale well and be secure.

However over the past 6 months to a year I’ve come to realize that as amazing as the people are on the VIP team, I want to get back into writing more code. Writing code is what got me into the WordPress community and Automattic itself in the first place and it is one the things I enjoy doing the most. I enjoy the challenge of designing and executing a coding project.

So on February 18th, I will be leaving the VIP team and switching to a team we call Janitorial. No, I won’t be sweeping up our hallways (that would require having offices!) but will instead be working on projects that slip through the cracks and don’t really fall under the umbrella of any of the other teams at Automattic. This includes making cool internal tools for all my great coworkers to use, something I’ve done a bit in my freetime previously and have really enjoyed.

I’ll miss working with all the great folks on the VIP team but I’m also looking forward to the new challenges that await me.

WordPress: Debug Functions Attached To A Filter

I was debugging something in WordPress, trying to figure out what callback function was applying a change to a filter (in this case a post’s content). To get a list of what functions were hooked into the filter, I threw together a quick helper function and I thought I’d post it here incase anyone else found it useful.

[code lang=”php”]function viper_debug_filter( $filter ) {
add_filter( $filter, function( $value ) {
global $wp_filter;

$filters = array();

foreach ( (array) $wp_filter[ current_filter() ] as $priority => $functions ) {
foreach ( (array) $functions as $function => $args ) {
$filters[$priority][] = $function;
}
}

var_dump( current_filter(), $filters );

return $value;
} );
}

// Pass the filter name here
viper_debug_filter( ‘the_content’ );[/code]

Nothing fancy like excluding itself from the output — it was just a quick and dirty hack. Use it as you see fit.