Ticket #33319: 33319.diff
File 33319.diff, 1.6 KB (added by , 9 years ago) |
---|
-
src/wp-admin/custom-header.php
878 878 // Update the attachment 879 879 $attachment_id = $this->insert_attachment( $object, $cropped ); 880 880 881 $url = $object['guid'];881 $url = wp_get_attachment_url( $attachment_id ); 882 882 $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) ); 883 883 884 884 // Cleanup. … … 1110 1110 $object = array( 1111 1111 'ID' => $parent_attachment_id, 1112 1112 'post_title' => basename($cropped), 1113 'post_content' => $url,1114 1113 'post_mime_type' => $image_type, 1115 1114 'guid' => $url, 1116 1115 'context' => 'custom-header' … … 1192 1191 $new_attachment_id = $this->insert_attachment( $object, $cropped ); 1193 1192 1194 1193 $object['attachment_id'] = $new_attachment_id; 1194 $object['url'] = wp_get_attachment_url( $new_attachment_id );; 1195 1195 $object['width'] = $dimensions['dst_width']; 1196 1196 $object['height'] = $dimensions['dst_height']; 1197 1197 -
src/wp-admin/js/customize-controls.js
2348 2348 * @param {object} croppedImage Cropped attachment data. 2349 2349 */ 2350 2350 onCropped: function(croppedImage) { 2351 var url = croppedImage. post_content,2351 var url = croppedImage.url, 2352 2352 attachmentId = croppedImage.attachment_id, 2353 2353 w = croppedImage.width, 2354 2354 h = croppedImage.height;