WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
4061 | * |
4062 | * The dynamic portion of the hook name, `$post->post_type`, refers to |
4063 | * the post type slug. |
4064 | * |
4065 | * @since 5.1.0 |
4066 | * |
4067 | * @param int $post_ID Post ID. |
4068 | * @param WP_Post $post Post object. |
4069 | */ |
4070 | do_action( "edit_post_{$post->post_type}", $post_ID, $post ); |
4071 |
|
4072 | /** |
4073 | * Fires once an existing post has been updated. |
4074 | * |
4075 | * @since 1.2.0 |
4076 | * |
4077 | * @param int $post_ID Post ID. |
4078 | * @param WP_Post $post Post object. |
4079 | */ |
Line | Code |
4220 | $wpdb->update( $wpdb->posts, array( 'post_status' => 'publish' ), array( 'ID' => $post->ID ) ); |
4221 |
|
4222 | clean_post_cache( $post->ID ); |
4223 |
|
4224 | $old_status = $post->post_status; |
4225 | $post->post_status = 'publish'; |
4226 | wp_transition_post_status( 'publish', $old_status, $post ); |
4227 |
|
4228 | /** This action is documented in wp-includes/post.php */ |
4229 | do_action( "edit_post_{$post->post_type}", $post->ID, $post ); |
4230 |
|
4231 | /** This action is documented in wp-includes/post.php */ |
4232 | do_action( 'edit_post', $post->ID, $post ); |
4233 |
|
4234 | /** This action is documented in wp-includes/post.php */ |
4235 | do_action( "save_post_{$post->post_type}", $post->ID, $post, true ); |
4236 |
|
4237 | /** This action is documented in wp-includes/post.php */ |
4238 | do_action( 'save_post', $post->ID, $post, true ); |