Changeset 23416 for trunk/wp-admin/includes/image-edit.php
- Timestamp:
- 02/14/2013 10:51:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/image-edit.php
r23246 r23416 455 455 return false; 456 456 457 $changes = !empty($_REQUEST['history']) ? json_decode( stripslashes($_REQUEST['history']) ) : null;457 $changes = !empty($_REQUEST['history']) ? json_decode( wp_unslash( $_REQUEST['history'] ) ) : null; 458 458 if ( $changes ) 459 459 $img = image_edit_apply_changes( $img, $changes ); … … 534 534 } 535 535 536 if ( !wp_update_attachment_metadata($post_id, $meta) || ! update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) {536 if ( !wp_update_attachment_metadata($post_id, $meta) || !wp_update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes) ) { 537 537 $msg->error = __('Cannot save image metadata.'); 538 538 return $msg; … … 588 588 } 589 589 } elseif ( !empty($_REQUEST['history']) ) { 590 $changes = json_decode( stripslashes($_REQUEST['history']) );590 $changes = json_decode( wp_unslash( $_REQUEST['history'] ) ); 591 591 if ( $changes ) 592 592 $img = image_edit_apply_changes($img, $changes); … … 700 700 if ( $success ) { 701 701 wp_update_attachment_metadata( $post_id, $meta ); 702 update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes);702 wp_update_post_meta( $post_id, '_wp_attachment_backup_sizes', $backup_sizes); 703 703 704 704 if ( $target == 'thumbnail' || $target == 'all' || $target == 'full' ) {
Note: See TracChangeset
for help on using the changeset viewer.