From 3575abd055bd17a6371db5af968d39fab66ae55f Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Thu, 28 Mar 2013 23:45:19 +0000 Subject: [PATCH] Use the wp_insert_post hook to save revisions, so we save revisions for an initial wp_insert_post() run, not just updates. see #16215 git-svn-id: http://core.svn.wordpress.org/trunk@23842 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index d8a4ff3bf7..efa5b53fa0 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -250,7 +250,7 @@ add_action( 'init', 'smilies_init', add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 ); add_action( 'plugins_loaded', 'wp_maybe_load_embeds', 0 ); add_action( 'shutdown', 'wp_ob_end_flush_all', 1 ); -add_action( 'post_updated', 'wp_save_post_revision', 10, 1 ); +add_action( 'wp_insert_post', 'wp_save_post_revision', 10, 1 ); add_action( 'publish_post', '_publish_post_hook', 5, 1 ); add_action( 'transition_post_status', '_transition_post_status', 5, 3 ); add_action( 'transition_post_status', '_update_term_count_on_transition_post_status', 10, 3 );