Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit f48310c

Browse files
author
Matthias Pfefferle
committed
nicer templating
1 parent ababd77 commit f48310c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

includes/class-linkbacks-walker-comment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ static function get_comment_author_link( $comment_ID = 0 ) {
3636
$author = get_comment_author( $comment );
3737

3838
if ( empty( $url ) || 'http://' == $url ) {
39-
$return = "<span class='p-name'>" . $author . "</span>";
39+
$return = sprintf( '<span class="p-name">%s</span>', $author );
4040
} else {
41-
$return = "<a href='$url' rel='external nofollow' class='u-url p-name'>$author</a>";
41+
$return = sprintf( '<a href="%s" rel="external" class="u-url p-name">%s</a>', $url, $author );
4242
}
4343

4444
/**
@@ -95,7 +95,7 @@ protected function html5_comment( $comment, $depth, $args ) {
9595
sprintf( '<b>%s</b>', self::get_comment_author_link( $comment ) )
9696
);
9797
if ( $type ) {
98-
echo '<small>&nbsp;@&nbsp;<cite><a href="' . $url . '">' . $host . '</a></cite></small>';
98+
printf( '<small>&nbsp;@&nbsp;<cite><a href="%s">%s</a></cite></small>', $url, $host );
9999
}
100100
?>
101101
</div><!-- .comment-author -->

0 commit comments

Comments
 (0)