WordPress.org

Make WordPress Core

Changeset 23261


Ignore:
Timestamp:
01/04/2013 08:01:19 AM (8 years ago)
Author:
koopersmith
Message:

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

This is consistent with 3.4 behavior.

see #22841.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r23260 r23261  
    414414            this.get('selection').on( 'add remove reset', this.refreshContent, this );
    415415
    416             this.on( 'insert', this._insertDisplaySettings, this );
    417 
    418416            if ( this.get('contentUserSetting') ) {
    419417                this.frame.on( 'content:activate', this.saveContentMode, this );
     
    456454
    457455            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 the
    465             // 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 );
    474456        },
    475457
Note: See TracChangeset for help on using the changeset viewer.