Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11068 closed enhancement (worksforme)

post.php should issue an action event

Reported by: hever's profile hever Owned by: westi's profile westi
Milestone: Priority: normal
Severity: normal Version: 2.8.5
Component: Plugins Keywords: post.php
Focuses: Cc:

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.

Change History (1)

#1 @scribu
15 years ago

  • Resolution set to worksforme
  • Status changed from new to closed

There are already plenty of hooks in post.php.

For saving custom fields metaboxes, you should use add_action('save_post', 'your_callback');

Note: See TracTickets for help on using tickets.