[wp-trac] [WordPress Trac] #20164: Attaching media box needs improvements

WordPress Trac noreply at wordpress.org
Thu Nov 8 01:05:37 UTC 2012


#20164: Attaching media box needs improvements
--------------------------+------------------
 Reporter:  markoheijnen  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by SergeyBiryukov):

 `ucfirst( $post->post_type )` is not translatable and doesn't work with
 UTF-8 strings.

 `singular_name` label should be used instead:
 {{{
 $post_type_object = get_post_type_object( $post->post_type );
 $html .= '<td><label for="found-'.$post->ID.'">'.esc_html(
 $post->post_title ).'</label></td><td>'.esc_html(
 $post_type_object->labels->singular_name ).'</td><td>'.esc_html( $time
 ).'</td><td>'.esc_html( $stat ).'</td></tr>'."\n\n";
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20164#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list