Intro To WordPress DevelopmentKenny Younger (@kenny)&Andy Brudtkuhl (@abrudtkuhl)
What does WordPress look like to the users?Let’s take a look!
Database
Database SchemaSource: SchemaBank.com
File Structure
/wp-admin/wp-content/plugins/Each plugin usually has its own directorythemes/Each theme has its own directoryuploads/Created on first upload (default location)wp-includes/wp-config.php
wp-config.phpdefine('WP_ALLOW_MULTISITE', true);
Debugging made easyDebugging flags added to wp-config.php:define( 'WP_DEBUG', true );define( 'SCRIPT_DEBUG', true );define( 'SAVEQUERIES', true );	 $wpdb->queries“All” hook:add_action( 'all', create_function( '', 'var_dump( current_filter() );' ) );Core Control Plugin: http://wordpress.org/extend/plugins/core-control/Dump Environment Plugin:http://wordpress.org/extend/plugins/dump_env/Source: http://www.andrewnacin.com/2010/04/23/5-ways-to-debug-wordpress/
WordPress ThemesWhat are themes? A way to skin WordPress
What’s In A WordPress Theme?WordPress themes are a combination of PHP, CSS, and image filesRequirements:HTMLCSSSome PHP
Anatomy Of A WordPress Theme
Theme StructureIndex.phpincludes header.phpIncludes sidebar.phpIncludes footer.php
Standard Theme ArchitectureHomepageindex.phphome.phpSingle Postsingle.phpPagepage.phpCategorycategory.phparchive.phpTags
tag.php
Search Results
search.php
404
404.php
The Stylesheet – style.cssThe comment headers in the style.css provide meta info to WP are are REQUIREDThisstylesheet also controls the layout and design elements of your theme…
Functions.phpContains theme related functions and commonly is used to generate dynamic sidebars
The LoopIf (havePosts)	show post stuffElse	nothing here!End if
Template Tagsthe_title()
the_permalink()
the_content()
the_excerpt()
And more!Theme Frameworks
What Is A WordPress Plugin?Plugins are used to add or enhance functionalities of your WordPress site
The Plugin Directoryhttp://wordpress.org/extend/plugins/
The Plugin APIThe API provides “Hooks” into WordPressNo more hacking the coreMade up of Actions and FiltersActions = functions triggered by eventsie: Call function on user log inFilters = functions that modify informationie: Add facebook share button before post
Plugin DataSometimes it’s necessary to store data…For large amounts, create a new database tableFor small amounts, use WordPress “Options” – a table with key/value pairs
Admin MenusCustom option panels for users to update settings for your pluginAdds options in WordPress Admin Dashboard
Users & Roles & CapabilitiesWordPress is designed to handle multiple users – from admin and editors to subscribers5 Pre-Defined RolesAdministratorEditorAuthorContributorSubscriberhttp://codex.wordpress.org/Roles_and_Capabilities
Custom FieldsAllow attaching meta-data to posts.http://www.smashingmagazine.com/2010/04/29/extend-wordpress-with-custom-fields/
Custom Post TypesUsed for:Real Estate ListingEvent CalendarMovie DatabaseIssue Management / Ticket SystemEtc.

Getting Started With WordPress Development

Editor's Notes

  • #5 Describe each table.