Beyond WP-CONTENT | #WCRaleigh
Upcoming SlideShare
Loading in...5
×
 

Beyond WP-CONTENT | #WCRaleigh

on

  • 2,076 views

A technical overview of the WordPress core files with the purpose of making you a more efficient developer

A technical overview of the WordPress core files with the purpose of making you a more efficient developer

Statistics

Views

Total Views
2,076
Views on SlideShare
2,029
Embed Views
47

Actions

Likes
2
Downloads
12
Comments
0

1 Embed 47

http://www.slideshare.net 47

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Beyond WP-CONTENT | #WCRaleigh Beyond WP-CONTENT | #WCRaleigh Presentation Transcript

  • BEYOND WP-CONTENT WordCamp Raleigh | 2010 @glennansley
  • PURPOSE
  • PURPOSE •WordPress file structure
  • PURPOSE •WordPress file structure •WordPress programing logic
  • PURPOSE •WordPress file structure •WordPress programing logic •Web and not-web resources
  • WORDPRESS FILE STRUCTURE Root Directory This is the starting point for your file system •Notable Files •index.php •wp-config.php •wp-load.php •xmlrpc.php
  • WORDPRESS FILE STRUCTURE Root Directory This is the starting point for your file system •Notable Folders •wp-content •wp-includes •wp-admin
  • WORDPRESS FILE STRUCTURE WP-Content This is folder contains all the files unique to your site. •Notable Folders •plugins •themes •uploads •upgrades
  • WORDPRESS FILE STRUCTURE WP Admin This is the location for almost everything admin related. •Notable Files •admin.php •admin-header.php •options-*.php •edit-*.php
  • WORDPRESS FILE STRUCTURE WP Admin This is the location for almost everything admin related. •Notable Folders •Notable Files in /includes •/includes •admin.php •meta-boxes.php •post.php •user.php
  • WORDPRESS FILE STRUCTURE WP-INCLUDES This folder contains most of the heavy lifting for WP •Notable Files •class-http.php •functions.php •class-phpmailer.php •general-template.php •classes.php •pluggable.php •default-filters.php •query.php •formatting.php •user.php
  • WordPress Programming Logic How does PHP traverse the WP file structure?
  • WordPress Programming Logic How does PHP traverse the WP file structure?
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed • It hits a PHP include, loads the requested file and processes down the script
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed • It hits a PHP include, loads the requested file and processes down the script • It in turn hits another include which processes down through two more includes
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed • It hits a PHP include, loads the requested file and processes down the script • It in turn hits another include which processes down through two more includes • At this point PHP is still processing data and there are no includes at the bottom of this file
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed • It hits a PHP include, loads the requested file and processes down the script • It in turn hits another include which processes down through two more includes • At this point PHP is still processing data and there are no includes at the bottom of this file • So PHP returns to the next line in the file we left and continues to process to the end of that file
  • WordPress Programming Logic How does PHP traverse the WP file structure? • The first file is loaded, checked for errors, and processed • It hits a PHP include, loads the requested file and processes down the script • It in turn hits another include which processes down through two more includes • At this point PHP is still processing data and there are no includes at the bottom of this file • So PHP returns to the next line in the file we left and continues to process to the end of that file • At the end of file two, PHP returns to the next line in file one and continues to the end of the script.
  • WordPress Programming Logic How does PHP traverse the WP file structure?
  • WordPress Programming Logic How does PHP traverse the WP file structure? • wp-blog-header.php is a great reference for this illustration.
  • WordPress Programming Logic How does PHP traverse the WP file structure? • wp-blog-header.php is a great reference for this illustration.
  • WordPress Programming Logic How does PHP traverse the WP file structure? • wp-blog-header.php is a great reference for this illustration. Load the data
  • WordPress Programming Logic How does PHP traverse the WP file structure? • wp-blog-header.php is a great reference for this illustration. Load the data Deliver the data
  • WordPress Programming Logic Quick review so far
  • WordPress Programming Logic Quick review so far •WordPress is made up of several files organized in folders.
  • WordPress Programming Logic Quick review so far •WordPress is made up of several files organized in folders. •/wp-content is where developers make most modifications.
  • WordPress Programming Logic Quick review so far •WordPress is made up of several files organized in folders. •/wp-content is where developers make most modifications. •PHP traverses this file structure in a logical manner, including only what is necessary for the current action.
  • WordPress Programming Logic What happens as PHP traverses the WP file structure?
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Includes requested PHP scripts.
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Includes requested PHP scripts. •Loads functions into the server’s memory
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Includes requested PHP scripts. •Loads functions into the server’s memory •Loads data into the server’s memory •REQUESTS •Database info •COOKIES and SESSIONS •CACHE •Constants, variables, class objects
  • WordPress Programming Logic What happens as PHP traverses the WP file structure?
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Invokes actions on the data in your server’s memory
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Invokes actions on the data in your server’s memory •Spitting HTML out to the browser
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Invokes actions on the data in your server’s memory •Spitting HTML out to the browser •Executing core PHP functions ( explode(), unset(), etc ).
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Invokes actions on the data in your server’s memory •Spitting HTML out to the browser •Executing core PHP functions ( explode(), unset(), etc ). •Executing WordPress defined functions already in memory.
  • WordPress Programming Logic What happens as PHP traverses the WP file structure? •Invokes actions on the data in your server’s memory •Spitting HTML out to the browser •Executing core PHP functions ( explode(), unset(), etc ). •Executing WordPress defined functions already in memory. •Making remote requests to other scripts or web services
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior •Undefined data (objects, variables, constants, etc)
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior •Undefined data (objects, variables, constants, etc) •Undefined functions
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior •Undefined data (objects, variables, constants, etc) •Undefined functions •Undefined class properties
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior •Undefined data (objects, variables, constants, etc) •Undefined functions •Undefined class properties •Missed hooks
  • WordPress Programming Logic Common errors based on a weak grasp of this behavior •Undefined data (objects, variables, constants, etc) •Undefined functions •Undefined class properties •Missed hooks It’s all about the timing!
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Hooks
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Hooks •init (action)
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Hooks •init (action) •admin_init (action)
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Hooks •init (action) •admin_init (action) •template_redirect (action)
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Hooks •init (action) •admin_init (action) •template_redirect (action) •plugins_loaded (action)
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions •&get_posts
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions •&get_posts •register_* ( importers, settings, widgets, posts, post types, taxonomies, menus )
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions •&get_posts •register_* ( importers, settings, widgets, posts, post types, taxonomies, menus ) •helper functions ( get_the_title, get_permalink, etc )
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions •&get_posts •register_* ( importers, settings, widgets, posts, post types, taxonomies, menus ) •helper functions ( get_the_title, get_permalink, etc ) •current_user_can
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Functions •&get_posts •register_* ( importers, settings, widgets, posts, post types, taxonomies, menus ) •helper functions ( get_the_title, get_permalink, etc ) •current_user_can •wp_redirect
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User •WP_Error
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User •WP_Error •Wp_Roles
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User •WP_Error •Wp_Roles •WP_Rewrite
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User •WP_Error •Wp_Roles •WP_Rewrite •WP_Http
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Classes •WP_Query •WP_User •WP_Error •Wp_Roles •WP_Rewrite •WP_Http •PHPMailer
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files •/wp-includes/pluggable.php
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files •/wp-includes/pluggable.php •/wp-includes/capabilities.php
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files •/wp-includes/pluggable.php •/wp-includes/capabilities.php •/wp-includes/default-filters.php
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files •/wp-includes/pluggable.php •/wp-includes/capabilities.php •/wp-includes/default-filters.php •/wp-includes/query.php
  • My Tipping Point MVPs Some of the most helpful aspects of WP core that have helped me become a more efficient developer Files •/wp-includes/pluggable.php •/wp-includes/capabilities.php •/wp-includes/default-filters.php •/wp-includes/query.php •/wp-settings.php
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/ •http://codex.wordpress.org/Mailing_Lists
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/ •http://codex.wordpress.org/Mailing_Lists •http://phpdoc.wordpress.org
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/ •http://codex.wordpress.org/Mailing_Lists •http://phpdoc.wordpress.org •http://twitter.com
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/ •http://codex.wordpress.org/Mailing_Lists •http://phpdoc.wordpress.org •http://twitter.com •http://wpdevel.wordpress.com/
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Web •http://wordpress.org/forums •http://codex.wordpress.org/ •http://codex.wordpress.org/Mailing_Lists •http://phpdoc.wordpress.org •http://twitter.com •http://wpdevel.wordpress.com/ •#wordpress and #wordpress-dev
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Not Web
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Not Web •WordPress for Dummies - @LisaSabinWilson
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Not Web •WordPress for Dummies - @LisaSabinWilson •The WordPress Bible - @technosailor
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Not Web •WordPress for Dummies - @LisaSabinWilson •The WordPress Bible - @technosailor •Professional WordPress - @williamsba & @mirmillo
  • My Tipping Point MVPs Some of the most helpful aspects of the WP community that have helped me become a more efficient developer Not Web •WordPress for Dummies - @LisaSabinWilson •The WordPress Bible - @technosailor •Professional WordPress - @williamsba & @mirmillo •Raleigh WP Meetup - http://meetup.com/Raleigh-WordPress-Meetup-Group/
  • BEYOND WP-CONTENT WordCamp Raleigh | 2010 @glennansley