Make WordPress Core

Ticket #42446: 42446.2.diff

File 42446.2.diff, 717 bytes (added by guillaumeturpin, 3 years ago)

Removed the conditional statement, and wrapped your solution into 3 lines for readability

  • src/wp-admin/includes/post.php

    diff --git a/src/wp-admin/includes/post.php b/src/wp-admin/includes/post.php
    index 718e18d1d5..b2cff75e08 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                update_post_meta( $post_id, '_edit_last', get_current_user_id() );
     645                $updated[] = $post_id;
    644646
    645647                if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
    646648                        if ( 'sticky' === $post_data['sticky'] ) {