Pass $update = true to the save_post and wp_insert_post hooks in wp_publish_post().

see #21450, [24823].

props wpsmith.
fixes #24957.


git-svn-id: http://core.svn.wordpress.org/trunk@24977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-08-05 21:41:51 +00:00
parent dfb236ee00
commit 487327cf4e
1 changed files with 2 additions and 2 deletions

View File

@ -2969,8 +2969,8 @@ function wp_publish_post( $post ) {
wp_transition_post_status( 'publish', $old_status, $post );
do_action( 'edit_post', $post->ID, $post );
do_action( 'save_post', $post->ID, $post );
do_action( 'wp_insert_post', $post->ID, $post );
do_action( 'save_post', $post->ID, $post, true );
do_action( 'wp_insert_post', $post->ID, $post, true );
}
/**