Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

CSI: WordPress -- Getting Into the Guts

3,959 views

Published on

An introduction to one of the greatest features of WordPress: Extensibility. Developers area able to use plugins and themes to extend the power of WordPress through a flexible set of APIs. These APIs include pluggable functions, action and filter hooks, and metadata.

Published in: Technology, Business
  • Login to see the comments

  • Be the first to like this

CSI: WordPress -- Getting Into the Guts

  1. 1. CSI:Getting Into the GutsWordCamp Birmingham, January 14, 2012
  2. 2. CSI:Getting Into the GutsWordCamp Birmingham, January 14, 2012
  3. 3. Version 0.5 Please note that due to unforeseen events, I did not complete this slide deck to my satisfaction before presenting it at WordCamp Birmingham. I will be doing this presentation again at WordCampAtlanta, with an improved version of these slides. At that time, I will replace this presentation with the new, improved version which will contain more concrete developer information, code samples, and more comprehensive pointers to resources. Thank you for your understanding. -- Dougal
  4. 4. WordPressRocks!
  5. 5. WordPressRocks!Why?
  6. 6. ExtensibilityWordPress can do just about anyfreaking thing you can think of
  7. 7. Extensibility
  8. 8. Extensibility✤ Rich developer APIs
  9. 9. Extensibility✤ Rich developer APIs✤ Themes
  10. 10. Extensibility✤ Rich developer APIs✤ Themes✤ Plugins
  11. 11. API
  12. 12. API✤ Application Programming Interface
  13. 13. API✤ Application Programming Interface✤ “...a source code based specification intended to be used as an interface by software components to communicate with each other.” – Wikipedia
  14. 14. What kind of APIs?✤ Pluggable functions✤ Hooks ✤ Actions and Filters✤ Metadata ✤ Post meta, User meta, Comment meta, Site Options✤ Custom Javascript and CSS
  15. 15. PluggableFunctionsLogin/Cookie/User infoEmail notifications, wp_mail()Security: nonces, password salts &hashesAvatarsDisplay of revision diffs
  16. 16. Themes✤ Sidebars and Widgets✤ Custom Headers and Backgrounds✤ Custom Post Types and Taxonomies
  17. 17. Plugins
  18. 18. Plugins✤ Plugins can do... practically anything:
  19. 19. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages
  20. 20. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.)
  21. 21. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.) ✤ Extend user info
  22. 22. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.) ✤ Extend user info ✤ Use Roles & Capabilities to control access to features
  23. 23. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.) ✤ Extend user info ✤ Use Roles & Capabilities to control access to features ✤ Create workflows (e.g., EditFlow plugin)
  24. 24. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.) ✤ Extend user info ✤ Use Roles & Capabilities to control access to features ✤ Create workflows (e.g., EditFlow plugin) ✤ Alternative login systems (LDAP, SSO)
  25. 25. Plugins✤ Plugins can do... practically anything: ✤ Modify posts/pages ✤ Integrate 3rd party data (Twitter, Facebook, etc.) ✤ Extend user info ✤ Use Roles & Capabilities to control access to features ✤ Create workflows (e.g., EditFlow plugin) ✤ Alternative login systems (LDAP, SSO) ✤ The sky’s the limit!
  26. 26. ActionsActions are eventsUse them to DO something, ratherthan to CHANGE something
  27. 27. Actionsplugins_loaded()setup_theme()wp_init()template_redirect()wp_head()wp_footer() http://andy.wordpress.com/2008/10/30/wordpress-include-stack/
  28. 28. FiltersModify existing content<?phpadd_filter( ‘the_content’, ‘lolify’ );function lolify( $text_in ) { $text out = do_cool_stuff( $text_in ); return $text_out;}?>
  29. 29. MetadataLets you add additional details beyondwhat WordPress provides out-of-the-box.
  30. 30. Metadata✤ “Data about Data”Lets you provide additionaldetails that may or may not bevisible on the site.
  31. 31. Putting ittogether✤ codex.wordpress.org✤ make.wordpress.org✤ wpdevel.wordpress.com
  32. 32. Who are you?Dougal Campbell@dougaldougal.us /dougal.gunters.orgdougal.campbell@gmail.com

×