From f05e592506375199a522c2534506d002c4eb6e36 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sun, 28 Jul 2013 21:05:25 +0000 Subject: [PATCH] Pass $update to the save_post and wp_insert_post hooks in wp_insert_post(). props ericmann, fixes #21450. git-svn-id: https://develop.svn.wordpress.org/trunk@24823 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 9f2e672c44..8b97e4ef12 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2872,8 +2872,8 @@ function wp_insert_post($postarr, $wp_error = false) { do_action( 'post_updated', $post_ID, $post_after, $post_before); } - do_action('save_post', $post_ID, $post); - do_action('wp_insert_post', $post_ID, $post); + do_action( 'save_post', $post_ID, $post, $update ); + do_action( 'wp_insert_post', $post_ID, $post, $update ); return $post_ID; }