Changeset 31070 for trunk/src/wp-admin/includes/image-edit.php
- Timestamp:
- 01/07/2015 10:47:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/image-edit.php
r31043 r31070 568 568 $meta = wp_get_attachment_metadata($post_id); 569 569 $file = get_attached_file($post_id); 570 $backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true );570 $backup_sizes = $old_backup_sizes = get_post_meta( $post_id, '_wp_attachment_backup_sizes', true ); 571 571 $restored = false; 572 572 $msg = new stdClass; … … 630 630 } 631 631 632 if ( !wp_update_attachment_metadata($post_id, $meta) || !update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) { 632 if ( ! wp_update_attachment_metadata( $post_id, $meta ) || 633 ( $old_backup_sizes !== $backup_sizes && ! update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes ) ) ) { 634 633 635 $msg->error = __('Cannot save image metadata.'); 634 636 return $msg;
Note: See TracChangeset
for help on using the changeset viewer.