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

Moving Beyond the Codex

Learning WordPress from Itself

Erick Hitter

Design Engineer @ Automattic

@ethitter

About Me

Why Are You Here?

Core?

Basic Structure

PHPDoc

PHPDoc

/**
 * Display the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 */
function the_content($more_link_text = null, $stripteaser = false) {
	$content = get_the_content($more_link_text, $stripteaser);
	$content = apply_filters('the_content', $content);
	$content = str_replace(']]>', ']]>', $content);
	echo $content;
}

Danger, Will Robinson!

You may encounter functions whose names are prefixed with an underscore. You may even be tempted to use them.

Don't.

The underscore prefix is WordPress' convention indicating an internal function not intended for public consumption.

wp-admin

wp-admin

Basically, if it pertains to the admin interface, it's in wp-admin.

The underlying functions that handle interactions with the database, however, are in wp-includes.

wp-admin media

wp-admin meta boxes

Again, presentation is in wp-admin, data handling is in wp-includes.

wp-includes

wp-includes classes

wp-includes templating

wp-includes functional

A note on WordPress convention

So how about some specifics?

With the high-level overview out of the way, let's talk details (relatively speaking).

Some important files to know about

formatting.php

formatting.php

Joking aside, data validation and sanitization is essential. Thankfully, WordPress helps out immensely.

query.php

post.php

post.php

post-template.php

More naming conventions

And now some exceptions

link-template.php

link-template.php

Catch-all files

pluggable.php

ack!

Faster than grep (it's meant for programmers)

http://betterthangrep.com/

$ ack "class WP_User"
wp-admin/includes/class-wp-users-list-table.php
10:class WP_Users_List_Table extends WP_List_Table {

wp-admin/includes/deprecated.php
297:class WP_User_Search {

wp-includes/capabilities.php
359:class WP_User {

wp-includes/user.php
335:class WP_User_Query {

Questions?

Slides are available at http://www.ethitter.com/blog/.

Check Twitter for a link as well: @ethitter.