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

Props jfarthing84, Mte90, brianvan, sudar, DrewAPicture.
Fixes #27056.
Built from https://develop.svn.wordpress.org/trunk@37424


git-svn-id: http://core.svn.wordpress.org/trunk@37390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2016-05-12 15:44:28 +00:00
parent 00adb457d2
commit 7f1abd441f
2 changed files with 12 additions and 1 deletions

View File

@ -275,6 +275,17 @@ case 'preview':
exit(); exit();
default: 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') ); wp_redirect( admin_url('edit.php') );
exit(); exit();
} // end switch } // end switch

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-alpha-37423'; $wp_version = '4.6-alpha-37424';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.