Make WordPress Core

Changeset 23272


Ignore:
Timestamp:
01/04/2013 08:07:42 PM (12 years ago)
Author:
nacin
Message:

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

This is consistent with 3.4 behavior. (User settings are now only updated when the user makes an explicit change.)

Merges [23261] to the 3.5 branch.

props koopersmith.
fixes #22841.

File:
1 edited

Legend:

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

    r23270 r23272  
    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.