So I added a new submission button to the edit page:
Using the post_submitbox_misc_actions
hook with the submit_button($text, $type, $name);
function.
I wanted to modify the data that's saved based on what button the user clicks. So if the user clicks on the regular update/submit button then the post would save normally. However if the user clicks on the new button, then I would modify some information about that post.
I was planning to use the wp_insert_post_data
hook to modify the data, but the problem is that I don't know what button the user clicked (using php).
So my question... is it possible to identify which button the user clicked using a hook (or some other method)?
Or, is this not the correct approach? And I should use some other method to interfere the save action?
Update:
I also tried logging $_GET and $_POST to see if there was any relevant information there, but couldn't find anything.