From b1053cca136d47dab12da30e5f459162f7d8c3d8 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 24 Jul 2014 20:57:05 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@29285 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 25ea293184..ad949a71bb 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -830,6 +830,7 @@ // Attachments browser defaults. @see media.view.AttachmentsBrowser searchable: false, sortable: true, + display: false, // Initial region modes. content: 'browse', toolbar: 'gallery-edit', @@ -2174,7 +2175,7 @@ sortable: state.get('sortable'), search: state.get('searchable'), filters: state.get('filterable'), - display: state.get('displaySettings'), + display: state.has('display') ? state.get('display') : state.get('displaySettings'), dragInfo: state.get('dragInfo'), suggestedWidth: state.get('suggestedWidth'),