Ticket #23116: media-views.GalleryEdit.add_display_settings.patch

File media-views.GalleryEdit.add_display_settings.patch, 1.3 KB (added by nd987, 5 months ago)

Adds an option for displaying settings on GalleryEdit controllers. Defaults to show settings.

  • wp-includes/js/media-views.js

     
    556556        // ------------------------------- 
    557557        media.controller.GalleryEdit = media.controller.Library.extend({ 
    558558                defaults: { 
    559                         id:         'gallery-edit', 
    560                         multiple:   false, 
    561                         describe:   true, 
    562                         edge:       199, 
    563                         editing:    false, 
    564                         sortable:   true, 
    565                         searchable: false, 
    566                         toolbar:    'gallery-edit', 
    567                         content:    'browse', 
    568                         title:      l10n.editGalleryTitle, 
    569                         priority:   60, 
    570                         dragInfo:   true, 
     559                        id:                     'gallery-edit', 
     560                        multiple:               false, 
     561                        describe:               true, 
     562                        edge:                   199, 
     563                        editing:                false, 
     564                        sortable:               true, 
     565                        searchable:             false, 
     566                        toolbar:                'gallery-edit', 
     567                        content:                'browse', 
     568                        title:                  l10n.editGalleryTitle, 
     569                        priority:               60, 
     570                        dragInfo:               true, 
     571                        displaySettings:        true, 
    571572 
    572573                        // Don't sync the selection, as the Edit Gallery library 
    573574                        // *is* the selection. 
     
    609610                }, 
    610611 
    611612                gallerySettings: function( browser ) { 
     613                        if ( ! this.get('displaySettings') ) 
     614                                return; 
     615                         
    612616                        var library = this.get('library'); 
    613617 
    614618                        if ( ! library || ! browser )