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.

Modular plugins

1,351 views

Published on

The slides for my presentation on Modular WordPress plugins at WordCamp Kansas City, 2012.

Published in: Technology, Art & Photos
  • Be the first to comment

Modular plugins

  1. 1. Modular PluginsPippin Williamson - http://pippinsplugins.com @pippinsplugins http://facebook.com/pippinsplugins around the web as “mordauk”
  2. 2. what are modular plugins?
  3. 3. plugins that can be extended
  4. 4. plugins that can be modified
  5. 5. Definition:
  6. 6. Definition:plugins that can be modified and extended
  7. 7. Definition:plugins that can be modified and extended without ever changing core plugin code
  8. 8. Example:e-commerce plugins that accept add-on payment gateways
  9. 9. Example 2: forum plugins that allow customformatting and toolbars via add-on plugins
  10. 10. Example 3:any plugin that has components that can be changed by a theme or other plugins
  11. 11. Example 3:any plugin that has components that can be changed by a theme or other plugins - even tiny components
  12. 12. text
  13. 13. textimages
  14. 14. textimages data
  15. 15. textimages datalayouts
  16. 16. text images data layoutsfunctions
  17. 17. any plugin can be modular
  18. 18. but not all aremost plugins are not modular and cannot be modified
  19. 19. but not all are most plugins are not modular and cannot be modified -not without changing core code
  20. 20. it is a choice
  21. 21. it is a choiceplugin developers must chooseto make their plugins modular
  22. 22. the key to modularity
  23. 23. the key to modularity using core WordPress methods
  24. 24. the key to modularity using core WordPress methods add_action()
  25. 25. the key to modularity using core WordPress methods add_action() do_action()
  26. 26. the key to modularity using core WordPress methods add_action() do_action() add_filter()
  27. 27. the key to modularity using core WordPress methods add_action() do_action() add_filter() apply_filters()
  28. 28. what usually happens
  29. 29. what usually happensmost plugin developers do not include the necessary components
  30. 30. let’s see an example
  31. 31. what’s wrong with this?
  32. 32. what’s wrong with this? not that much, actually
  33. 33. what’s wrong with this? not that much, actually but . . .
  34. 34. what’s wrong with this? not that much, actually but . . . it could be much better
  35. 35. how it should be done
  36. 36. what can we do with this?
  37. 37. the results
  38. 38. let’s modify it slightly different method slightly different output
  39. 39. now go a little further
  40. 40. combinedfilters and actions can be combined
  41. 41. real world examples taken from real plugins
  42. 42. Restricted Site Access
  43. 43. BuddyPress
  44. 44. Soliloquy Slider
  45. 45. WP E-Commerce
  46. 46. Easy Content Types
  47. 47. Gravity Forms
  48. 48. Easy Digital Downloads
  49. 49. Easy Digital Downloads
  50. 50. reasons to build modular plugins
  51. 51. make developers happy
  52. 52. make developers happy the community matters
  53. 53. make developers happy the community mattershelp the community by writing extensible code
  54. 54. make developers happy the community mattershelp the community by writing extensible code others will say nice things about you
  55. 55. Matt Varone“Extensible code makes me happy.”
  56. 56. Ryan Imel“I think the true measure of a quality theme or plugin is how well it works with other plugins and themes - - both those that already exist and those that haven’t been made yet.”
  57. 57. Jake Goldman“What would core do?”
  58. 58. WordPress is modular how do you think plugins work?
  59. 59. WordPress is modular how do you think plugins work? -by using methods like those we just looked at
  60. 60. built with extensible functionsWordPress is comprised of extensible “modules”
  61. 61. build it like WordPressbuild your plugins like you were building WordPress itself
  62. 62. why?
  63. 63. why?because you ARE building WordPress itself
  64. 64. thanks

×