Ticket #47458: 47458.diff
File 47458.diff, 2.8 KB (added by , 5 years ago) |
---|
-
src/js/media/views/frame/edit-attachments.js
80 80 // Initialize modal container view. 81 81 if ( this.options.modal ) { 82 82 this.modal = new wp.media.view.Modal({ 83 controller: this, 84 title: this.options.title 83 controller: this, 84 title: this.options.title, 85 hasCloseButton: false 85 86 }); 86 87 87 88 this.modal.on( 'open', _.bind( function () { -
src/js/media/views/modal.js
26 26 27 27 initialize: function() { 28 28 _.defaults( this.options, { 29 container: document.body, 30 title: '', 31 propagate: true 29 container: document.body, 30 title: '', 31 propagate: true, 32 hasCloseButton: true 32 33 }); 33 34 34 35 this.focusManager = new wp.media.view.FocusManager({ … … 40 41 */ 41 42 prepare: function() { 42 43 return { 43 title: this.options.title 44 title: this.options.title, 45 hasCloseButton: this.options.hasCloseButton 44 46 }; 45 47 }, 46 48 -
src/wp-includes/media-template.php
195 195 196 196 <script type="text/html" id="tmpl-media-modal"> 197 197 <div tabindex="0" class="<?php echo $class; ?>"> 198 <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button> 198 <# if ( data.hasCloseButton ) { #> 199 <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button> 200 <# } #> 199 201 <div class="media-modal-content"></div> 200 202 </div> 201 203 <div class="media-modal-backdrop"></div> … … 319 321 <div class="edit-media-header"> 320 322 <button class="left dashicons <# if ( ! data.hasPrevious ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit previous media item' ); ?></span></button> 321 323 <button class="right dashicons <# if ( ! data.hasNext ) { #> disabled <# } #>"><span class="screen-reader-text"><?php _e( 'Edit next media item' ); ?></span></button> 324 <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button> 322 325 </div> 323 326 <div class="media-frame-title"></div> 324 327 <div class="media-frame-content"></div>