Make WordPress Core

Ticket #61428: 61428.patch

File 61428.patch, 1.1 KB (added by gauravsingh7, 18 months ago)

Adding a patch for fixing this issue!

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

     
    688688                } ).done( function( response ) {
    689689                        // Whether the executed action was `scale` or `restore`, the response does have a message.
    690690                        if ( response && response.data.message.msg ) {
     691                                if( 'restore' === action && response.data.message.orig_size) {
     692                                        // Reset the original sizes for this object on restore
     693                                        t.hold.ow = response.data.message.orig_size.width;
     694                                        t.hold.oh = response.data.message.orig_size.height;
     695                                }
    691696                                wp.a11y.speak( response.data.message.msg );
    692697                                return;
    693698                        }
  • src/wp-admin/includes/image-edit.php

     
    880880                }
    881881        }
    882882
     883        $msg->orig_size = array(
     884                'width'  => $meta['width'],
     885                'height' => $meta['height'],
     886        );
     887
    883888        return $msg;
    884889}
    885890