About a month ago, I shared a post that discussed the code that’s required to save custom post meta data. Generally speaking, this is a lot of boilerplate that’s required to make sure that the data being saved is permitted and that the author has permissions to do so.
Of course, depending on the nature of your project, the code will vary a little, but for the majority of the cases, it’s all the same.
But thanks to several commenters and contributors, the code has been completely refactored, and I’ve actually been using it in a recent project.

