Ticket #47147: 47147.1.diff
File 47147.1.diff, 2.3 KB (added by , 5 years ago) |
---|
-
src/js/_enqueues/lib/image-edit.js
503 503 504 504 // If a response is returned, close the editor and show an error. 505 505 if ( ret.error ) { 506 $('#imgedit-response-' + postid).html('<div class="error" ><p>' + ret.error + '</p></div>');506 $('#imgedit-response-' + postid).html('<div class="error"><p>' + ret.error + '</p></div>'); 507 507 imageEdit.close(postid); 508 508 return; 509 509 } … … 517 517 } 518 518 519 519 if ( ret.msg ) { 520 $('#imgedit-response-' + postid).html('<div class="updated" ><p>' + ret.msg + '</p></div>');520 $('#imgedit-response-' + postid).html('<div class="updated"><p>' + ret.msg + '</p></div>'); 521 521 } 522 522 523 523 if ( self._view ) { -
src/wp-admin/includes/image-edit.php
38 38 39 39 if ( $msg ) { 40 40 if ( isset( $msg->error ) ) { 41 $note = "<div class='error' ><p>$msg->error</p></div>";41 $note = "<div class='error'><p>$msg->error</p></div>"; 42 42 } elseif ( isset( $msg->msg ) ) { 43 $note = "<div class='updated' ><p>$msg->msg</p></div>";43 $note = "<div class='updated'><p>$msg->msg</p></div>"; 44 44 } 45 45 } 46 46 … … 234 234 <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" /> 235 235 236 236 <div id="imgedit-crop-<?php echo $post_id; ?>" class="imgedit-crop-wrap"> 237 <img id="image-preview-<?php echo $post_id; ?>" onload="imageEdit.imgLoaded('<?php echo $post_id; ?>')"src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&_ajax_nonce=<?php echo $nonce; ?>&postid=<?php echo $post_id; ?>&rand=<?php echo rand( 1, 99999 ); ?>" alt="" />237 <img id="image-preview-<?php echo $post_id; ?>" src="<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>?action=imgedit-preview&_ajax_nonce=<?php echo $nonce; ?>&postid=<?php echo $post_id; ?>&rand=<?php echo rand( 1, 99999 ); ?>" alt="" /> 238 238 </div> 239 239 240 240 <div class="imgedit-submit">