0
WordPress Plugin Development          WordCamp NL           03/24/2012
Luc De BrouwerWebdeveloper who loves WordPress, Magento,PHP, MySQL, HTML, CSS, jQuery, good food andNine Inch Nails. •   l...
Developing for WordPress is awesome!
The basics
Always start with the read me /       documentation!
Pair with others( Designers, developers, translators, ux specialists, etc. )
Turn debugging on                     Your users will thank you for it.Tip: Use Debug Bar and Debug Bar Console. It’s like...
The nitty-gritty   a.k.a. the fun stuff
Standard plugin information
Time to get hooked!
Set some actions
Possible hooksFilter functions       Action functionshas_filter()            has_action()add_filter()            add_action(...
And some more..Hooks for installation, activation, deactivation etc.
Set up your functions
Magic!
Do not reinvent the wheel!WordPress has an API for almost anything. Built-in will most likely run better than bolted-on.
Storing preferences                You’ve got plenty of options!         add_option( ‘WordCampNL’, ‘FTW’ );             ge...
But of course you can usecustom tables tables too!
There’s an API for that!Making HTTP requests, performing filesystem tasks, unzipping files, etc..
Namespace your stuff to avoid f*ck ups
Give your classes and functions a clear prefix
Security!Validate input, check user rights. We don’t any CSRF, XSS attacks etc.
The Codex is your friend      http://codex.wordpress.org/
Publish your plugin to theWordPress plugin repository  Free feedback and a bigger platform for your work!
Afterwards
Set up a support plan!Will you give support? If so, when? Will you offer paid support?
Keep everything up-to-date  Check if it works with every WordPress update etc.
Embrace forks and feedback        Open source matters!
Consult the codeBy reading the core I learned more in 2 hours then I could have learned in a 2 day course.
Thank you for your attention!
Questions?
Want to contact me or ask questions?           • lucdebrouwer.nl           • hello@lucdebrouwer.nl           • linkedin.co...
WordPress plugin development
WordPress plugin development
Upcoming SlideShare
Loading in...5
×

WordPress plugin development

379

Published on

My presentation for WordCampNL 2012 in English.

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

  • Be the first to like this

No Downloads
Views
Total Views
379
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress plugin development"

  1. 1. WordPress Plugin Development WordCamp NL 03/24/2012
  2. 2. Luc De BrouwerWebdeveloper who loves WordPress, Magento,PHP, MySQL, HTML, CSS, jQuery, good food andNine Inch Nails. • lucdebrouwer.nl • hello@lucdebrouwer.nl • linkedin.com/in/lucdebrouwer • twitter.com/ldebrouwer
  3. 3. Developing for WordPress is awesome!
  4. 4. The basics
  5. 5. Always start with the read me / documentation!
  6. 6. Pair with others( Designers, developers, translators, ux specialists, etc. )
  7. 7. Turn debugging on Your users will thank you for it.Tip: Use Debug Bar and Debug Bar Console. It’s like Firebug for WordPress!
  8. 8. The nitty-gritty a.k.a. the fun stuff
  9. 9. Standard plugin information
  10. 10. Time to get hooked!
  11. 11. Set some actions
  12. 12. Possible hooksFilter functions Action functionshas_filter() has_action()add_filter() add_action()apply_filters() do_action()current_filter() do_action_ref_array()merge_filters() did_action()remove_filter() remove_action()remove_all_filters() remove_all_actions()
  13. 13. And some more..Hooks for installation, activation, deactivation etc.
  14. 14. Set up your functions
  15. 15. Magic!
  16. 16. Do not reinvent the wheel!WordPress has an API for almost anything. Built-in will most likely run better than bolted-on.
  17. 17. Storing preferences You’ve got plenty of options! add_option( ‘WordCampNL’, ‘FTW’ ); get_option( ‘WordCampNL’);update_option( ‘WordCampNL’, ’#WCNL12 is awesome’ );
  18. 18. But of course you can usecustom tables tables too!
  19. 19. There’s an API for that!Making HTTP requests, performing filesystem tasks, unzipping files, etc..
  20. 20. Namespace your stuff to avoid f*ck ups
  21. 21. Give your classes and functions a clear prefix
  22. 22. Security!Validate input, check user rights. We don’t any CSRF, XSS attacks etc.
  23. 23. The Codex is your friend http://codex.wordpress.org/
  24. 24. Publish your plugin to theWordPress plugin repository Free feedback and a bigger platform for your work!
  25. 25. Afterwards
  26. 26. Set up a support plan!Will you give support? If so, when? Will you offer paid support?
  27. 27. Keep everything up-to-date Check if it works with every WordPress update etc.
  28. 28. Embrace forks and feedback Open source matters!
  29. 29. Consult the codeBy reading the core I learned more in 2 hours then I could have learned in a 2 day course.
  30. 30. Thank you for your attention!
  31. 31. Questions?
  32. 32. Want to contact me or ask questions? • lucdebrouwer.nl • hello@lucdebrouwer.nl • linkedin.com/in/lucdebrouwer • twitter.com/ldebrouwer
  1. A particular slide catching your eye?

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

×