Cain & Obenland — Episode 4

Preview:

DESCRIPTION

 

Citation preview

Episode 4:The real C’n’O in The OC

Do You _stand Themes?

The real C’n’O in The OC

Special Guest: Mike Schroder

Hooking Up with WordPress

Michael Cain!

Theme Generator at Automattic @michaeldcain

!mapandmenu.com

Konstantin Obenland!

Code Wrangler at Automattic!@obenland!

!konstantin.obenland.it

Do You _stand Themes?

Starter Themes

• Not a parent theme.

• Not a theme framework.

• Foundation of a new theme.

Why Underscores

• Just the right amount.

• Experience from five default themes.

• Experience from creating themes for millions of users on WordPress.com.

• Does everything the WordPress way.

Why Underscores

• Semi-standard for WordPress.org Theme Repository.

• Best feature is its lack of features! No tearing down necessary.

• Readable code with good documentation.

• Very active community.

2010 2011 2012 2013 2014

Pedigree

Twenty Eleven

Twenty Ten

Twenty Twelve

Twenty Thirteen

Toolbox

Twenty Fourteen

Further

Twenty Fifteen

300,000 Downloads

71 Contributorsfrom 18 countries

Most Popular WordPress Project**Starred PHP Projects on GitHub, excluding WordPress itself

Underscores.me@underscoresme

git.io/_s

Still to come:

Special Guest: Mike Schroder

Hooking Up with WordPress

In no every way affiliated with or and sponsored by…

WordCamp Ventura CountyNovember 8th, 2014

Mike SchroderSomewhat deep and superficially geeky

Mike Schroder!

Developer; WordPress Specialist at DreamHost @DH_Shredder

!getsource.net

Hooking Up with WordPress

There’s more:

In no every way affiliated with or and sponsored by…

WordCamp MaineAugust 16th, 2014

Hooking Up with WordPressGetting Started with Actions and Filters

WordPress Actions and Filters

Allow you to modify or add functionality

by calling functions at specific times.

WordPress Actions and Filters

Filters call functions that take some kind of input,

modify it, and return it.

function my_plugin_custom_content( $content ) { $search = 'Michael Cain'; $replace = 'Michael "The Great" Cain'; $content = preg_replace( $search, $replace, $content );! return $content;}add_filter( 'the_content', 'my_plugin_custom_content' );

WordPress Actions

Actions call functions and

don’t care about their returned value.

A filter without arguments or a returned value.

function my_theme_google_font() { wp_enqueue_style( 'my-theme-montserrat', '//fonts.googleapis.com/css?family=Montserrat', array(), null );}add_action( 'wp_enqueue_scripts', 'my_theme_google_font' );

Keep on Hookin’

Filter Functions

• add_action()

• has_action()

• do_action()

• do_action_ref_array()

• doing_action()

• did_action()

• remove_action()

• remove_all_actions()

Action Functions

• add_filter()

• has_filter()

• apply_filters()

• doing_filter()

• current_filter()

• remove_filter()

• remove_all_filters()

Keep on Hookin’

Filter Functions

• add_action()

• has_action()

• do_action()

• do_action_ref_array()

• doing_action()

• did_action()

• remove_action()

• remove_all_actions()

Action Functions

• add_filter()

• has_filter()

• apply_filters()

• doing_filter()

• current_filter()

• remove_filter()

• remove_all_filters()

The Endcain.obenland.it

!

@michaeldcain @obenland