Posts: Fire a `post_action_{$action}` action for a custom post action request.

Props jfarthing84, Mte90, brianvan, sudar, DrewAPicture.
Fixes #27056.

git-svn-id: https://develop.svn.wordpress.org/trunk@37424 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-05-12 15:43:48 +00:00
parent 8f14aed705
commit 7773a713c4
1 changed files with 11 additions and 0 deletions

View File

@ -275,6 +275,17 @@ case 'preview':
exit();
default:
/**
* Fires for a given custom post action request.
*
* The dynamic portion of the hook name, `$action`, refers to the custom post action.
*
* @since 4.6.0
*
* @param int $post_id Post ID sent with the request.
*/
do_action( "post_action_{$action}", $post_id );
wp_redirect( admin_url('edit.php') );
exit();
} // end switch