Media: Correctly set the edit gallery's library. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1d6fa49ae2
commit
cc58e827f3
@ -502,6 +502,10 @@
|
||||
},
|
||||
|
||||
initialize: function() {
|
||||
// If we haven't been provided a `library`, create a `Selection`.
|
||||
if ( ! this.get('library') )
|
||||
this.set( 'library', new media.model.Selection() );
|
||||
|
||||
// The single `Attachment` view to be used in the `Attachments` view.
|
||||
if ( ! this.get('AttachmentView') )
|
||||
this.set( 'AttachmentView', media.view.Attachment.Gallery );
|
||||
@ -846,6 +850,7 @@
|
||||
|
||||
// Gallery states.
|
||||
new media.controller.Gallery({
|
||||
library: options.selection,
|
||||
editing: options.editing,
|
||||
menu: 'gallery'
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user