Make WordPress Core

Changeset 29241


Ignore:
Timestamp:
07/19/2014 02:43:27 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Add a class for get_comment_author_link() in Recent Comments widget.

props DrewAPicture, dannydehaan, 5um17.
fixes #27944.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-widgets.php

    r28787 r29241  
    872872
    873873            foreach ( (array) $comments as $comment) {
    874                 $output .=  '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';
     874                $output .= '<li class="recentcomments">';
     875                /* translators: comments widget: 1: comment author, 2: post link */
     876                $output .= sprintf( _x( '%1$s on %2$s', 'widgets' ),
     877                    '<span class="comment-author-link">' . get_comment_author_link() . '</span>',
     878                    '<a href="' . esc_url( get_comment_link( $comment->comment_ID ) ) . '">' . get_the_title( $comment->comment_post_ID ) . '</a>'
     879                );
     880                $output .= '</li>';
    875881            }
    876882        }
Note: See TracChangeset for help on using the changeset viewer.