From 146c2301322bc47e82651ff01d4e52a1c1c8729e Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 5 Aug 2013 21:41:51 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@24977 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/post.php b/wp-includes/post.php index 4179e7fc09..506affb0c3 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -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 ); } /**