From e73a323a16644623cd187090b3f85f6844f6ef83 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: https://develop.svn.wordpress.org/trunk@23261 602fd350-edb4-49c9-b593-d223f7449a82 --- 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;