mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Posts, Post Types: Update _edit_last meta when posts are edited in bulk.
When posts are edited in bulk, the `_edit_last` meta was not updated for each post. This change adds a call to update the `_edit_last` meta to the current user ID for each post the is updated. Props calebwoodbridge, peterwilsoncc, guillaumeturpin, audrasjb. Fixes #42446. git-svn-id: https://develop.svn.wordpress.org/trunk@52141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d762d720cc
commit
04f62997d3
@ -640,7 +640,9 @@ function bulk_edit_posts( $post_data = null ) {
|
||||
// Prevent wp_insert_post() from overwriting post format with the old data.
|
||||
unset( $post_data['tax_input']['post_format'] );
|
||||
|
||||
$updated[] = wp_update_post( $post_data );
|
||||
$post_id = wp_update_post( $post_data );
|
||||
update_post_meta( $post_id, '_edit_last', get_current_user_id() );
|
||||
$updated[] = $post_id;
|
||||
|
||||
if ( isset( $post_data['sticky'] ) && current_user_can( $ptype->cap->edit_others_posts ) ) {
|
||||
if ( 'sticky' === $post_data['sticky'] ) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user