mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Allow the settings view for galleries to be disabled when instantiating wp.media.controller.GalleryEdit
.
Props nd987. Fixes #23116. Built from https://develop.svn.wordpress.org/trunk@28577 git-svn-id: http://core.svn.wordpress.org/trunk@28402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1ba1b3ec29
commit
746397f18b
@ -785,18 +785,19 @@
|
|||||||
*/
|
*/
|
||||||
media.controller.GalleryEdit = media.controller.Library.extend({
|
media.controller.GalleryEdit = media.controller.Library.extend({
|
||||||
defaults: {
|
defaults: {
|
||||||
id: 'gallery-edit',
|
id: 'gallery-edit',
|
||||||
multiple: false,
|
multiple: false,
|
||||||
describe: true,
|
describe: true,
|
||||||
edge: 199,
|
edge: 199,
|
||||||
editing: false,
|
editing: false,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
searchable: false,
|
searchable: false,
|
||||||
toolbar: 'gallery-edit',
|
toolbar: 'gallery-edit',
|
||||||
content: 'browse',
|
content: 'browse',
|
||||||
title: l10n.editGalleryTitle,
|
title: l10n.editGalleryTitle,
|
||||||
priority: 60,
|
priority: 60,
|
||||||
dragInfo: true,
|
dragInfo: true,
|
||||||
|
displaySettings: true,
|
||||||
|
|
||||||
// Don't sync the selection, as the Edit Gallery library
|
// Don't sync the selection, as the Edit Gallery library
|
||||||
// *is* the selection.
|
// *is* the selection.
|
||||||
@ -838,10 +839,15 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
gallerySettings: function( browser ) {
|
gallerySettings: function( browser ) {
|
||||||
|
if ( ! this.get('displaySettings') ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var library = this.get('library');
|
var library = this.get('library');
|
||||||
|
|
||||||
if ( ! library || ! browser )
|
if ( ! library || ! browser ) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
library.gallery = library.gallery || new Backbone.Model();
|
library.gallery = library.gallery || new Backbone.Model();
|
||||||
|
|
||||||
|
4
wp-includes/js/media-views.min.js
vendored
4
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user