[wp-trac] [WordPress Trac] #55840: Internationalization support for sizes added by 'edit_custom_thumbnail_sizes' filter

WordPress Trac noreply at wordpress.org
Thu Feb 9 20:15:15 UTC 2023


#55840: Internationalization support for sizes added by
'edit_custom_thumbnail_sizes' filter
--------------------------+-----------------------
 Reporter:  tmatsuur      |       Owner:  antpb
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  6.2
Component:  Media         |     Version:  6.0
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------

Comment (by azaozz):

 Replying to [comment:23 petitphp]:

 > Since `thumbnail` is a special case...

 The `image_size_names_choose` is used at 7 more places in core, and the
 array that is being filtered is consistent everywhere:
 {{{
 array(
         'thumbnail' => __( 'Thumbnail' ),
         'medium'    => __( 'Medium' ),
         'large'     => __( 'Large' ),
         'full'      => __( 'Full Size' ),
 )
 }}}

 I don't think it is a good idea to make it different/inconsistent here.

 As this will be the eight location of that filter, perhaps having a
 function that just applies the filter would be better? Not sure if
 `image_size_names_choose()` is a good name for a function though, perhaps
 something like `wp_image_size_display_names()` is better. Can make a patch
 a bit later if somebody doesn't beat me to it :)

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


More information about the wp-trac mailing list