[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:05:24 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):

 Or, alternatively, this condition could be based on whether or not
 `$this->l10n['replace_media']` is populated to begin with in PHP. So then
 `WP_Media_Widget_Gallery` could define `replace_media` as `null` and then
 the template could do:

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

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


More information about the wp-trac mailing list