Media: Do not update attachment display user settings when a single attachment is inserted.

This is consistent with 3.4 behavior.

see #22841.


git-svn-id: http://core.svn.wordpress.org/trunk@23261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2013-01-04 08:01:19 +00:00
parent 774df9900e
commit da06cf3e2d

View File

@ -413,8 +413,6 @@
this.get('selection').on( 'add remove reset', this.refreshContent, this );
this.on( 'insert', this._insertDisplaySettings, this );
if ( this.get('contentUserSetting') ) {
this.frame.on( 'content:activate', this.saveContentMode, this );
this.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );
@ -457,22 +455,6 @@
return displays[ attachment.cid ];
},
_insertDisplaySettings: function() {
var selection = this.get('selection'),
display;
// If inserting one image, set those display properties as the
// default user setting.
if ( selection.length !== 1 )
return;
display = this.display( selection.first() ).toJSON();
setUserSetting( 'align', display.align );
setUserSetting( 'imgsize', display.size );
setUserSetting( 'urlbutton', display.link );
},
syncSelection: function() {
var selection = this.get('selection'),
manager = this.frame._selection;