Changeset 24178
- Timestamp:
- 05/06/2013 09:49:13 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/revision.php
r24177 r24178 373 373 374 374 $post_id = wp_update_post( $update ); 375 if ( is_wp_error( $post_id ) )375 if ( ! $post_id || is_wp_error( $post_id ) ) 376 376 return $post_id; 377 377 378 if ( $post_id ) 379 do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] ); 380 378 // Add restore from details 381 379 $restore_details = array( 382 380 'restored_revision_id' => $revision_id, 383 'restored_by_user' => get_current_user_id(),384 'restored_time' => time()381 'restored_by_user' => get_current_user_id(), 382 'restored_time' => time() 385 383 ); 386 384 update_post_meta( $post_id, '_post_restored_from', $restore_details ); 385 386 // Update last edit user 387 update_post_meta( $post_id, '_edit_last', get_current_user_id() ); 388 389 do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] ); 387 390 388 391 return $post_id;
Note: See TracChangeset
for help on using the changeset viewer.