Changeset 23272
- Timestamp:
- 01/04/2013 08:07:42 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.5/wp-includes/js/media-views.js
r23270 r23272 414 414 this.get('selection').on( 'add remove reset', this.refreshContent, this ); 415 415 416 this.on( 'insert', this._insertDisplaySettings, this );417 418 416 if ( this.get('contentUserSetting') ) { 419 417 this.frame.on( 'content:activate', this.saveContentMode, this ); … … 456 454 457 455 return displays[ attachment.cid ]; 458 },459 460 _insertDisplaySettings: function() {461 var selection = this.get('selection'),462 display;463 464 // If inserting one image, set those display properties as the465 // default user setting.466 if ( selection.length !== 1 )467 return;468 469 display = this.display( selection.first() ).toJSON();470 471 setUserSetting( 'align', display.align );472 setUserSetting( 'imgsize', display.size );473 setUserSetting( 'urlbutton', display.link );474 456 }, 475 457
Note: See TracChangeset
for help on using the changeset viewer.