WordPress Plugin Programming

One of the things that makes developing for WordPress so fun is the nature of its extensibility through plugins. When it comes to WordPress plugin programming, there are actually two ways that you can write your plugins:

  1. Object-Oriented Programming
  2. Procedural Programming

In the lastest series running on Envato, Stephen Harris and I provide an in-depth discussion on both of these strategies.

WordPress Plugin Programming

Object-Oriented Programming

For developing WordPress plugins using object-oriented programming, I cover the following topics:

  • Working definition of object-oriented programming
  • A survey of the Widgets API
  • Classes and a logical grouping of functions
  • Advanced topics in object-oriented programming
  • Understanding how to define the class, the constructor, and access-level of functions
  • Advantages of using object-oriented programming in WordPress plugin development

This particular article isn’t meant to serve as an advocate for writing object-oriented code, only some of the advantages of doing so.

Procedural Programming

And for developing WordPress plugins using procedural programming techniques, Stephen covers the following:

  • What is Procedural Programming?
  • The Basics of Procedural Programming
  • A Case For Using Procedural Programming
  • Object-Oriented Programming and Procedural Programming

All-in-all, Stephen and I attempted to provide a balanced approach for laying out the various techniques for WordPress plugin programming.

There’s no single right way to do – only advantages and disadvantages to both – our ultimate goal being to provide a level of education and laying out the various options for doing so.

There has been some good discussion in the comments of both posts, so feel free to head over to articles and chime in or leave your thoughts here in the comments.