Ticket #6698: 6698.diff

File 6698.diff, 1.2 KB (added by Denis-de-Bernardy, 4 years ago)
Line 
1Index: wp-includes/default-filters.php
2===================================================================
3--- wp-includes/default-filters.php     (revision 11256)
4+++ wp-includes/default-filters.php     (working copy)
5@@ -195,7 +195,6 @@
6 add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
7 add_action( 'shutdown', 'wp_ob_end_flush_all', 1);
8 add_action( 'pre_post_update', 'wp_save_post_revision' );
9-add_action('publish_post', '_publish_post_hook', 5, 1);
10 add_action('future_post', '_future_post_hook', 5, 2);
11 add_action('future_page', '_future_post_hook', 5, 2);
12 add_action('save_post', '_save_post_hook', 5, 2);
13Index: wp-includes/post.php
14===================================================================
15--- wp-includes/post.php        (revision 11256)
16+++ wp-includes/post.php        (working copy)
17@@ -3239,6 +3239,7 @@
18                if ( '' == get_the_guid($post->ID) )
19                        $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post->ID ) ), array( 'ID' => $post->ID ) );
20                do_action('private_to_published', $post->ID);  // Deprecated, use private_to_publish
21+               _publish_post_hook($post->ID);
22        }
23 
24        // Always clears the hook in case the post status bounced from future to draft.