Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Use a spacebar or arrow keys to navigate

WC 401: Playing Well With Others

WordCamp Phoenix 2013

Erick Hitter

Design Engineer @ Automattic

@ethitter

About Me

Premise

 

Arguably, hooks are one of WordPress' most powerful, and most important, features.

And?

 

While there are always places in Core where an action or filter would be useful, this is much moreso the case in our plugins.

Really?

 

Don't take my word for it. What does Brad Williams think?

 

Really?

 

Brad was talking specifically about Jetpack, but it is hardly the only plugin that lacks sufficient hooks.

But how?

 

We're all probably familiar with add_action() and add_filter().

 

Their counterparts aren't much more complicated.

do_action()

 

Example:

<?php
do_action( 'after_setup_theme' );
?>

apply_filters()

 

Example:

<?php
$excerpt_length = apply_filters('excerpt_length', 55);
?>

To the code!

Questions?