[wp-trac] [WordPress Trac] #35392: Dashboard "Recent Comments" widget improvements

WordPress Trac noreply at wordpress.org
Fri Feb 19 18:50:24 UTC 2016


#35392: Dashboard "Recent Comments" widget improvements
---------------------------------------+--------------------------------
 Reporter:  afercia                    |       Owner:  afercia
     Type:  defect (bug)               |      Status:  assigned
 Priority:  normal                     |   Milestone:  4.5
Component:  Widgets                    |     Version:  4.4
 Severity:  normal                     |  Resolution:
 Keywords:  has-screenshots has-patch  |     Focuses:  ui, accessibility
---------------------------------------+--------------------------------

Comment (by ramiy):

 @afercia,


 Replace this code:
 {{{
 printf(
         /* translators: 1: comment author, 2: post title, 3: notification
 if the comment is pending */
         __( 'From %1$s on %2$s%3$s' ),
         '<cite class="comment-author">' . get_comment_author_link(
 $comment ) . '</cite>',
         $comment_post_link_or_title,
         ' <span class="approve" aria-hidden="true">' . __( '[Pending]' ) .
 '</span>'
 );
 }}}

 With this one:
 {{{
 printf(
         /* translators: 1: comment author, 2: post title, 3: notification
 if the comment is pending */
         __( 'From %1$s on %2$s %3$s' ),
         '<cite class="comment-author">' . get_comment_author_link(
 $comment ) . '</cite>',
         $comment_post_link_or_title,
         '<span class="approve" aria-hidden="true">' . __( '[Pending]' ) .
 '</span>'
  );
 }}}

 ----

 The change:

 * `%2$s%3$s`  => `%2$s %3$s`
 * `' <span` => `'<span`

 Moving the space before the span, into the string between the two
 placeholders.

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


More information about the wp-trac mailing list