Your SlideShare is downloading. ×
0
Plugin                     Development                                           - Joey Kudish                         htt...
About me                 • WordPress developer since 2007                 • Initially built sites for a variety of clients...
Friday, 11 January, 13
What’s a                         plugin?Friday, 11 January, 13
A plugin extends or                    modi!es WordPress                     to do something it                    didn’t ...
Themes can act as           plugins. Oh and there’s              mu-plugins too.Friday, 11 January, 13
Plugins can be                         huge...Friday, 11 January, 13
... or tiny.Friday, 11 January, 13
What’s in a plugin?Friday, 11 January, 13
Where does it                       go?     wp-content/plugins/[plugin_name]        or wp-content/mu-plugins/Friday, 11 Ja...
In order to “hook”                    into WordPress, we                    use action and !lter                          ...
Action hooks allow                         you to add your own                         code to WordPress’                 ...
Filter hooks allow                     you to modify an                   existing variable or                   piece of ...
Demo timeFriday, 11 January, 13
Let’s add Google                           Webmaster Tools                         veri!cation to our siteFriday, 11 Janua...
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Finding hooks                 • WordPress.org Codex (http://                 codex.wordpress.org/)                 • http:...
Some pro tipsFriday, 11 January, 13
Use built-in APIs,                         don’t re-invent the                                wheelFriday, 11 January, 13
Use WordPress coding                              standardsFriday, 11 January, 13
Be nice to other devs.                 Namespace your classes                  and functions. Leave                    hoo...
Demo timeFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
hey that’s the                         !le we want to hook                         intoFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Let’s create our                              pluginFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
It works, now let’s                     have some funFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Finished pluginFriday, 11 January, 13
A word on                          SecurityFriday, 11 January, 13
don’t trust                           usersFriday, 11 January, 13
sanitize input,                         escape output               http://codex.wordpress.org/Data_ValidationFriday, 11 J...
protect users from                   malicious attacks,                      use nonces to                  validate user ...
Plugin                         DistributionFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Further                         readingFriday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
Friday, 11 January, 13
http://www.wrox.com/WileyCDA/WroxTitle/   http://www.packtpub.com/wordpress-plugin-      Professional-WordPress-Plugin-   ...
Thanks!                          Q&A                         http://slides.jkudish.comFriday, 11 January, 13
Upcoming SlideShare
Loading in...5
×

WordCamp Victoria 2013: Plugin Development 2013

714

Published on

This is a presentation from WordCamp Victoria 2013 where I show power users and novice developers how to get started with plugin development. I think a lot of people don’t realize how easy it is to get started with plugin development or just how small and simple can be. It doesn’t require 100s of lines of code…

Many WordPress tutorials out there talk about copy this or that to your functions.php file in your theme. However, it’s just as easy to create your own functionality plugin; which makes for easier to maintain code in the future that isn’t theme dependant. I begin this talk with the basics of what a plugin is and how it’s structured. I then explain the hooks (actions and filters API), followed by a very simplistic demo. I then give some pro tips and talk about some of the most commonly used WordPress APIs in plugins, as well as promote coding standards. A second more in-depth demo is then presented. Finally, I discuss security in plugins and share some resources for developers and users to further learn from.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
714
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "WordCamp Victoria 2013: Plugin Development 2013"

  1. 1. Plugin Development - Joey Kudish http://slides.jkudish.comFriday, 11 January, 13
  2. 2. About me • WordPress developer since 2007 • Initially built sites for a variety of clients • Freelance plugin development • Code Wrangler at WordPress.com / Automattic since May 2011 • Originally from Montreal, moved to Vancouver in 2011Friday, 11 January, 13
  3. 3. Friday, 11 January, 13
  4. 4. What’s a plugin?Friday, 11 January, 13
  5. 5. A plugin extends or modi!es WordPress to do something it didn’t previously doFriday, 11 January, 13
  6. 6. Themes can act as plugins. Oh and there’s mu-plugins too.Friday, 11 January, 13
  7. 7. Plugins can be huge...Friday, 11 January, 13
  8. 8. ... or tiny.Friday, 11 January, 13
  9. 9. What’s in a plugin?Friday, 11 January, 13
  10. 10. Where does it go? wp-content/plugins/[plugin_name] or wp-content/mu-plugins/Friday, 11 January, 13
  11. 11. In order to “hook” into WordPress, we use action and !lter hooksFriday, 11 January, 13
  12. 12. Action hooks allow you to add your own code to WordPress’ call stackFriday, 11 January, 13
  13. 13. Filter hooks allow you to modify an existing variable or piece of informationFriday, 11 January, 13
  14. 14. Demo timeFriday, 11 January, 13
  15. 15. Let’s add Google Webmaster Tools veri!cation to our siteFriday, 11 January, 13
  16. 16. Friday, 11 January, 13
  17. 17. Friday, 11 January, 13
  18. 18. Friday, 11 January, 13
  19. 19. Finding hooks • WordPress.org Codex (http:// codex.wordpress.org/) • http://adambrown.info/p/wp_hooks • Debug Bar + Debug Bar Action Hooks plugin (http://wordpress.org/extend/plugins/debug-bar- action-hooks/) • Search core (use your IDE or a command line tool like ack)Friday, 11 January, 13
  20. 20. Some pro tipsFriday, 11 January, 13
  21. 21. Use built-in APIs, don’t re-invent the wheelFriday, 11 January, 13
  22. 22. Use WordPress coding standardsFriday, 11 January, 13
  23. 23. Be nice to other devs. Namespace your classes and functions. Leave hooks for others.Friday, 11 January, 13
  24. 24. Demo timeFriday, 11 January, 13
  25. 25. Friday, 11 January, 13
  26. 26. Friday, 11 January, 13
  27. 27. Friday, 11 January, 13
  28. 28. Friday, 11 January, 13
  29. 29. hey that’s the !le we want to hook intoFriday, 11 January, 13
  30. 30. Friday, 11 January, 13
  31. 31. Friday, 11 January, 13
  32. 32. Friday, 11 January, 13
  33. 33. Friday, 11 January, 13
  34. 34. Let’s create our pluginFriday, 11 January, 13
  35. 35. Friday, 11 January, 13
  36. 36. Friday, 11 January, 13
  37. 37. Friday, 11 January, 13
  38. 38. Friday, 11 January, 13
  39. 39. Friday, 11 January, 13
  40. 40. Friday, 11 January, 13
  41. 41. Friday, 11 January, 13
  42. 42. Friday, 11 January, 13
  43. 43. It works, now let’s have some funFriday, 11 January, 13
  44. 44. Friday, 11 January, 13
  45. 45. Friday, 11 January, 13
  46. 46. Friday, 11 January, 13
  47. 47. Friday, 11 January, 13
  48. 48. Finished pluginFriday, 11 January, 13
  49. 49. A word on SecurityFriday, 11 January, 13
  50. 50. don’t trust usersFriday, 11 January, 13
  51. 51. sanitize input, escape output http://codex.wordpress.org/Data_ValidationFriday, 11 January, 13
  52. 52. protect users from malicious attacks, use nonces to validate user actions http://codex.wordpress.org/WordPress_NoncesFriday, 11 January, 13
  53. 53. Plugin DistributionFriday, 11 January, 13
  54. 54. Friday, 11 January, 13
  55. 55. Friday, 11 January, 13
  56. 56. Friday, 11 January, 13
  57. 57. Further readingFriday, 11 January, 13
  58. 58. Friday, 11 January, 13
  59. 59. Friday, 11 January, 13
  60. 60. Friday, 11 January, 13
  61. 61. http://www.wrox.com/WileyCDA/WroxTitle/ http://www.packtpub.com/wordpress-plugin- Professional-WordPress-Plugin- development-cookbook/book Development.productCd-0470916222.htmlFriday, 11 January, 13
  62. 62. Thanks! Q&A http://slides.jkudish.comFriday, 11 January, 13
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×