Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to WordPress Plugin Development

Introduction to WordPress Plugin Development

An introduction to developing WordPress plugins, presented at the first ever WordPress Contributor Workshop day on the 27th of March 2015 in Cape Town, South Africa.


Matty Cohen

March 27, 2015

More Decks by Matty Cohen

Other Decks in Programming


  1. @mattyza WordPress Plugins 101 Everything you need to know to

    start designing and building WordPress plugins, right away.
  2. @mattyza Goal: Developer Harmony Folks find plugin development to be

    tricky and confusing. Lets change that.
  3. @mattyza Start with an Idea The end result is equal

    parts vision and execution.
  4. @mattyza Naming and Structure A strong foundation is of paramount

  5. @mattyza Plugin Headers Halt! License and identification, please. WooCommerce

  6. @mattyza Code Structure Procedural or Object-Oriented? Lets discuss.

  7. @mattyza Actions & Filters The backbone of your plugin, and

    how it interacts with WordPress.
  8. @mattyza Look under the Hood Some say… WordPress core code

    is all available to you. Look inside!
  9. @mattyza Please readme.txt Constructing the perfect readme.txt file for your

  10. @mattyza Test, Test, Test! Test your code. Test it again.

    Get a friend to test. Then test it again.
  11. @mattyza Listing on WordPress.org Sharing your plugin with the WordPress

  12. @mattyza WordPress Plugins 102 Simplifying the basics and removing the

    repetitive tasks.
  13. @mattyza Localise Your Static Text Break down international borders, with

  14. @mattyza Use Magic Functions Turn common conditionals into one-liners. Thanks

  15. @mattyza Use a Starter Plugin http://github.com/mattyza/starter-plugin/

  16. @mattyza Keep it lean and relevant. Find a starter which

    meets your needs. If those needs change, fork it.
 (Don’t forget to pull request back to the original!)
  17. @mattyza WordPress Plugins 103 Tips and tricks only possible to

    learn through experience.
  18. @mattyza Be mindful of other plugins If your plugin relies

    on another plugin, initialise on plugins_loaded.
  19. @mattyza You’re building within WordPress Be mindful that you’re building

    a tool which fits within an existing system.
  20. @mattyza Lets Chat General discussion and questions around WordPress plugin

  21. @mattyza @mattyza @woothemes matty.co.za woothemes.com