Skip to content

Commit

Permalink
Merge pull request #1623 from WordPress/fix/1447-gallery-settings
Browse files Browse the repository at this point in the history
Suppress Gallery Settings Sidebar when editing gallery
  • Loading branch information
mkaz committed Jul 5, 2017
2 parents c1bfe93 + b93fdb9 commit 5ce605c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blocks/library/gallery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const editMediaLibrary = ( attributes, setAttributes ) => {
};

const editFrame = wp.media( frameConfig );

// the frameConfig settings dont carry to other state modals
// so requires setting this attribute directory to not show settings
editFrame.state( 'gallery-edit' ).attributes.displaySettings = false;

function updateFn() {
setAttributes( {
images: this.frame.state().attributes.library.models.map( ( a ) => {
Expand Down

0 comments on commit 5ce605c

Please sign in to comment.