register_meta()
March 31, 2015The solution is easy and relies only on core functionality. It’s a simple function called register_meta(). This function is almost identical to the more commonly used register_setting(). When we use register_setting(), we are able to register a callback function. That way, when anyone saves this setting that’s being registered, it passes through that callback for sanitation and validation.
We can do the exact same thing for meta fields with register_meta and not just post meta, but any type of meta data. And, it’s easy to do.
Didn’t know about register_meta() and i think i need to rewrite some stuff now.