Make WordPress Core

Changeset 22140


Ignore:
Timestamp:
10/09/2012 12:55:44 AM (12 years ago)
Author:
koopersmith
Message:

Properly handle inserting full size images. props timbeks, fixes #22124.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/mce-view.js

    r22126 r22140  
    388388        size    = attachment.sizes ? attachment.sizes[ props.size ] : {};
    389389
    390         if ( ! size )
     390        if ( ! size ) {
    391391            delete props.size;
    392 
    393         img.width  = size.width  || attachment.width;
    394         img.height = size.height || attachment.height;
    395         img.src    = size.url    || attachment.url;
     392            size = attachment;
     393        }
     394
     395        img.width  = size.width;
     396        img.height = size.height;
     397        img.src    = size.url;
    396398
    397399        // Update `img` classes.
Note: See TracChangeset for help on using the changeset viewer.