WordPress.org

Make WordPress Core

Changeset 29285


Ignore:
Timestamp:
07/24/2014 08:57:05 PM (7 years ago)
Author:
wonderboymusic
Message:

Don't render Attachment Display Settings when display is set to false. Currently, the value for display in the media.view.AttachmentsBrowser instance in the media.view.MediaFrame.Select frame is set to the value for displaySettings.
These values do different things, so check for the existence of display on the state before arbitrarily setting it to the displaySettings value.

Real world: this hides display settings when you select an image while editing a Gallery.

Fixes #28653.

File:
1 edited

Legend:

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

    r29282 r29285  
    831831            searchable:      false,
    832832            sortable:        true,
     833            display:         false,
    833834            // Initial region modes.
    834835            content:         'browse',
     
    21752176                search:     state.get('searchable'),
    21762177                filters:    state.get('filterable'),
    2177                 display:    state.get('displaySettings'),
     2178                display:    state.has('display') ? state.get('display') : state.get('displaySettings'),
    21782179                dragInfo:   state.get('dragInfo'),
    21792180
Note: See TracChangeset for help on using the changeset viewer.