What is the best way to temporarily save draft post data on custom admin page
-
I’m building a plugin that uses a custom admin page and submits a form. Currently, my form logic is hooked into the form’s custom admin_action hook, and if the validation fails, I’m redirecting back to my custom page with a serialized array of error codes in the url parameters.
The problem is that, when redirecting back to the custom page, I no longer have access to the $_POST vars I submitted initially, so I don’t know the best way to store those values the user tried to submit.
Would it make more sense to move that logic to the top of my custom page and call
do_action('wp_insert_post', 'wp_insert_post');
directly so I can access the $_POST data still?The page I need help with: [log in to see the link]
- The topic ‘What is the best way to temporarily save draft post data on custom admin page’ is closed to new replies.