Opened 17 years ago
Closed 17 years ago
#11068 closed enhancement (worksforme)
post.php should issue an action event
| Reported by: | hever | Owned by: | westi |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugins | Version: | 2.8.5 |
| Severity: | normal | Keywords: | post.php |
| Cc: | Focuses: |
Description
The subject is Handling POST Requests (http://codex.wordpress.org/Handling_POST_and_AJAX_Requests).
As described at a forum post (http://wordpress.org/support/topic/327586) post.php should issue an action event like admin-post.php do.
You have to provide some strange workarounds to redirect the request to admin-post.php that issues your action. Then you have to do some workarounds again to let post.php handle its parts of the request.
A really easy and useful solution would be issuing an action in post.php. Then no workarounds are needed. By the way it would be perhaps useful to use a hidden input field named custom_action istead of action. Then there is no needed to restore the original action in the custom action hook.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
There are already plenty of hooks in post.php.
For saving custom fields metaboxes, you should use add_action('save_post', 'your_callback');