edit_post_(post_type)
Fires once an existing post has been updated.
The dynamic portion of the hook name, $post->post_type, refers to the post type slug.
Possible hook names include:
Использование
add_action( 'edit_post_(post_type)', 'wp_kama_edit_post_type_action', 10, 2 ); /** * Function for `edit_post_(post_type)` action-hook. * * @param int $post_id Post ID. * @param WP_Post $post Post object. * * @return void */ function wp_kama_edit_post_type_action( $post_id, $post ){ // action... }
- $post_id(int)
- Post ID.
- $post(WP_Post)
- Post object.
Список изменений
С версии 5.1.0 | Введена. |
Где вызывается хук
edit_post_(post_type)
edit_post_(post_type)
wp-includes/post.php 4706
do_action( "edit_post_{$post->post_type}", $post_id, $post );
wp-includes/post.php 4925
do_action( "edit_post_{$post->post_type}", $post->ID, $post );
wp-includes/comment.php 2770
do_action( "edit_post_{$post->post_type}", $post_id, $post );
wp-includes/class-wp-customize-manager.php 3103
do_action( "edit_post_{$post->post_type}", $post->ID, $post );