Make WordPress Core

Ticket #47147: 47147.1.diff

File 47147.1.diff, 2.3 KB (added by ryanshoover, 5 years ago)

Patch to address the issue

  • src/js/_enqueues/lib/image-edit.js

     
    503503
    504504                        // If a response is returned, close the editor and show an error.
    505505                        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>');
    507507                                imageEdit.close(postid);
    508508                                return;
    509509                        }
     
    517517                        }
    518518
    519519                        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>');
    521521                        }
    522522
    523523                        if ( self._view ) {
  • src/wp-admin/includes/image-edit.php

     
    3838
    3939        if ( $msg ) {
    4040                if ( isset( $msg->error ) ) {
    41                         $note = "<div class='error'><p>$msg->error</p></div>";
     41                        $note = "<div class='error'><p>$msg->error</p></div>";
    4242                } elseif ( isset( $msg->msg ) ) {
    43                         $note = "<div class='updated'><p>$msg->msg</p></div>";
     43                        $note = "<div class='updated'><p>$msg->msg</p></div>";
    4444                }
    4545        }
    4646
     
    234234                <input type="hidden" id="imgedit-y-<?php echo $post_id; ?>" value="<?php echo isset( $meta['height'] ) ? $meta['height'] : 0; ?>" />
    235235
    236236                <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&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;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&amp;_ajax_nonce=<?php echo $nonce; ?>&amp;postid=<?php echo $post_id; ?>&amp;rand=<?php echo rand( 1, 99999 ); ?>" alt="" />
    238238                </div>
    239239
    240240                <div class="imgedit-submit">