I added a Meta Box Like So:
add_action('add_meta_boxes', function() {
add_meta_box('CNMeta', 'Custom MetaBox', 'CNCustomMeta', 'post');
});
I also added a thing that saves all of the meta information like this:
add_action('save_post', function($id) {
if(isset($_POST['CNPrice']) ) {
update_post_meta( $id, 'CNDetails', strip_tags($_POST['CNDetails']) );
}
});
So they can save it by updating the post, it would be nice if I could add a submit button at the bottom of the meta box that also updates the post (and doesn’t popup a warning saying “You are about to leave this post unsaved”
How would I do something like that?
To update a post.