Add validation and error handling when saving custom fields?
I have a function that defines a custom field on a post type. Say the field is “subhead”. When the post is saved, I want to do some validation on the input, and display an error message on the post edit screen if necessary. Something like: // Handle post updating function wpse_update_post_custom_values($post_id, $post) { // … Read more