The purpose of this series is to start doing a deeper dive into working with object-oriented programming in the context of WordPress.
And since the WordPress Widgets API is one of the APIs that does use object-oriented practices, it’s a logical place to start. Further, it will give us some foundational techniques that we can use to apply to future work as we see how to build more object-oriented projects on WordPress in future series.
So far, we’ve covered the following:
- WordPress Widgets: An Object-Oriented Approach. The Widgets API provides a solid litmus test and example of how to get started with object-oriented programming in WordPress.
- WordPress Widgets: How to Detect Object-Oriented Programming. The goal is to arm you with everything you need to detect object-oriented practices.
If you’re not caught up, now’s a great time to do so. And if you have, then you’ll recall from the last post, we ended with the following note:
That is, we’ll revisit the WordPress Widget Boilerplate and I’m going to be refactoring it in its current state to adopt more modern PHP standards.
To begin updating the WordPress Widget Boilerplate to follow said standards, we need to do a few things:
- create a branch from the existing boilerplate,
- install code quality tools,
- ensure our IDE is properly set up,
- and begin refactoring the code to said standards.
And that’s what we’re going to start doing with this post.