In the previous post, I talked a bit about how working with WordPress meta boxes can be a bit of a hassle especially if you’re used to doing so in such a way the keeps all of the logic contained within a single file and a handful functions.
For example, if you’re working on a theme, then it’s likely that you’ve got a set of functions declared either in your functions.php
file or file referenced by said file that is responsible for making a call to add_meta_box
and all of the necessary arguments for rendering the meta box.
If you’re working on a plugin, it’s likely that this isn’t all together different; however, you may be approaching this from an object-oriented perspective. If that’s the case, then you may have a similar setup as above which isn’t really that different except you’re using classes and functions.