[wp-trac] [WordPress Trac] #41994: New Gallery Widget: Add Media button label should be updated for consistency

WordPress Trac noreply at wordpress.org
Wed Oct 4 16:03:55 UTC 2017


#41994: New Gallery Widget: Add Media button label should be updated for
consistency
-------------------------------------------------+-------------------------
 Reporter:  juhise                               |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  4.9
Component:  Widgets                              |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots good-first-bug       |     Focuses:  ui
  needs-patch                                    |
-------------------------------------------------+-------------------------

Comment (by westonruter):

 I think a better approach would be to just hide the `.change-media` button
 in the Gallery widget via CSS. Or we could wrap the button in the template
 with a conditional:

 {{{
 <# if ( ! data.hideReplaceButton ) { #>
         <button type="button" class="button change-media select-media
 selected">
                 <?php echo esc_html( $this->l10n['replace_media'] ); ?>
         </button>
 <# } #>
 }}}

 And then introduce this `hideReplaceButton` prop in the Gallery widget
 only.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/41994#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list