From da06cf3e2d9fb83e1140332e812aef35286f8e09 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Fri, 4 Jan 2013 08:01:19 +0000 Subject: [PATCH] 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 --- wp-includes/js/media-views.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index 84765355f1..733466c867 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -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;