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:
parent
774df9900e
commit
da06cf3e2d
|
@ -413,8 +413,6 @@
|
||||||
|
|
||||||
this.get('selection').on( 'add remove reset', this.refreshContent, this );
|
this.get('selection').on( 'add remove reset', this.refreshContent, this );
|
||||||
|
|
||||||
this.on( 'insert', this._insertDisplaySettings, this );
|
|
||||||
|
|
||||||
if ( this.get('contentUserSetting') ) {
|
if ( this.get('contentUserSetting') ) {
|
||||||
this.frame.on( 'content:activate', this.saveContentMode, this );
|
this.frame.on( 'content:activate', this.saveContentMode, this );
|
||||||
this.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );
|
this.set( 'content', getUserSetting( 'libraryContent', this.get('content') ) );
|
||||||
|
@ -457,22 +455,6 @@
|
||||||
return displays[ attachment.cid ];
|
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() {
|
syncSelection: function() {
|
||||||
var selection = this.get('selection'),
|
var selection = this.get('selection'),
|
||||||
manager = this.frame._selection;
|
manager = this.frame._selection;
|
||||||
|
|
Loading…
Reference in New Issue