WordPress.org

Make WordPress Core

Ticket #42446: 42446.1.diff

File 42446.1.diff, 732 bytes (added by guillaumeturpin, 3 months ago)
  • src/wp-admin/includes/post.php

    diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
    index 718e18d1d5..dabfb13045 100644
    a b function bulk_edit_posts( $post_data = null ) { 
    640640                // Prevent wp_insert_post() from overwriting post format with the old data.
    641641                unset( $post_data['tax_input']['post_format'] );
    642642
    643                 $updated[] = wp_update_post( $post_data );
     643                $post_id = wp_update_post( $post_data );
     644                if ( update_post_meta( $post_id, '_edit_last', get_current_user_id() ) ) {
     645                        $updated[] = $post_id;
     646                }
    644647
    645648                if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
    646649                        if ( 'sticky' === $post_data['sticky'] ) {