display_comment_author_data( object $comment, array $args, bool $show_pending_links )

Outputs comment author data


Parameters

$comment

(Required) Current comment information.

$args

(Required) An array of arguments.

$show_pending_links

(Required) Whether to show author link on pending comment.


Source

File: wp-includes/comment-template.php

function display_comment_author_data( $comment, $args, $show_pending_links ) {
	if ( 0 != $args['avatar_size'] ) {
		echo get_avatar( $comment, $args['avatar_size'] );
	}

	$comment_author = get_comment_author_link( $comment );

	if ( '0' == $comment->comment_approved && ! $show_pending_links ) {
		$comment_author = get_comment_author( $comment );
	}

	if ( current_theme_supports( 'html5' ) ) {
		printf(
			/* translators: %s: Comment author link. */
			__( '%s <span class="says">says:</span>' ),
			sprintf( '<b class="fn">%s</b>', $comment_author )
		);
	} else {
		printf(
			/* translators: %s: Comment author link. */
			__( '%s <span class="says">says:</span>' ),
			sprintf( '<cite class="fn">%s</cite>', $comment_author )
		);
	}
}

Changelog

Changelog
Version Description
CP-2.0.0 Introduced. CP-2.0.0