WordPress.org

Make WordPress Core

Ticket #36603: 36603.patch

File 36603.patch, 1000 bytes (added by chandrapatel, 4 years ago)

I have added post_updated action in wp_publish_post() which is fire after edit_post action.

  • src/wp-includes/post.php

     
    36233623        if ( 'publish' == $post->post_status )
    36243624                return;
    36253625
     3626        $post_before = $post;
     3627
    36263628        $wpdb->update( $wpdb->posts, array( 'post_status' => 'publish' ), array( 'ID' => $post->ID ) );
    36273629
    36283630        clean_post_cache( $post->ID );
     
    36313633        $post->post_status = 'publish';
    36323634        wp_transition_post_status( 'publish', $old_status, $post );
    36333635
     3636        $post_after = $post;
     3637
    36343638        /** This action is documented in wp-includes/post.php */
    36353639        do_action( 'edit_post', $post->ID, $post );
    36363640
    36373641        /** This action is documented in wp-includes/post.php */
     3642        do_action( 'post_updated', $post->ID, $post_after, $post_before );
     3643
     3644        /** This action is documented in wp-includes/post.php */
    36383645        do_action( "save_post_{$post->post_type}", $post->ID, $post, true );
    36393646
    36403647        /** This action is documented in wp-includes/post.php */