WordPress.org

Make WordPress Core

Changeset 22506


Ignore:
Timestamp:
11/09/12 12:09:15 (2 years ago)
Author:
koopersmith
Message:

Media: Correctly set the edit gallery's library. see #21390.

File:
1 edited

Legend:

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

    r22501 r22506  
    503503 
    504504        initialize: function() { 
     505            // If we haven't been provided a `library`, create a `Selection`. 
     506            if ( ! this.get('library') ) 
     507                this.set( 'library', new media.model.Selection() ); 
     508 
    505509            // The single `Attachment` view to be used in the `Attachments` view. 
    506510            if ( ! this.get('AttachmentView') ) 
     
    847851                // Gallery states. 
    848852                new media.controller.Gallery({ 
     853                    library: options.selection, 
    849854                    editing: options.editing, 
    850855                    menu:    'gallery' 
Note: See TracChangeset for help on using the changeset viewer.