In continuing to work on sanitizing arrays of input with the WordPress Settings API, there are two things that we need to do:
- Refactor the existing code that we have so it’s as clean as possible
- Determine what fields we’re going to use to mark as required
In this particular article, we’re going to focus on both. This particular article is going to include the code necessary to tighten up our existing code and then we’ll begin laying the ground work for introducing a new class – a validation class – when we begin looking at the second step.