This is the fifth post in a series on An Object-Oriented Approach To The WordPress Settings API. Part 4.
In the last post in this series, I showed how to define a base class that represents some of the attributes and functionality our Dashboard class should have, and then I showed how to use inheritance in our Settings class so that we can take advantage of some of that functionality.
This post is going to include a little bit of redundant code, but the purpose of doing that is to show how the display
, sanitize
, and partial all fit together, and it’s done to help reinforce how the Settings API uses all of these features to read and write information to and from the database.
If you’re familiar with the Settings API, this post may not be as of much help; however, if you’re still new to it, then it may be worth reading.
Ultimately, the purpose of the post is to get us closer to have a fully working plugin that uses some basic object-oriented concepts as well as having a well-organized plugin that will help to contribute to maintainability.
Continue reading