post_action_(action)
Fires for a given custom post action request.
The dynamic portion of the hook name, $action, refers to the custom post action.
Usage
add_action( 'post_action_(action)', 'wp_kama_post_action' );
/**
* Function for `post_action_(action)` action-hook.
*
* @param int $post_id Post ID sent with the request.
*
* @return void
*/
function wp_kama_post_action( $post_id ){
// action...
}
- $post_id(int)
- Post ID sent with the request.
Changelog
| Since 4.6.0 | Introduced. |
Where the hook is called
In file: /wp-admin/post.php
post_action_(action)
wp-admin/post.php 363
do_action( "post_action_{$action}", $post_id );