Code Duplication    Length = 15-15 lines in 2 locations

wp-includes/comment-template.php 2 locations

@@ 84-98 (lines=15) @@
81
 *									 Default current comment.
82
 * @return string The current comment author's email
83
 */
84
function get_comment_author_email( $comment_ID = 0 ) {
85
	$comment = get_comment( $comment_ID );
86
87
	/**
88
	 * Filters the comment author's returned email address.
89
	 *
90
	 * @since 1.5.0
91
	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
92
	 *
93
	 * @param string     $comment_author_email The comment author's email address.
94
	 * @param int        $comment_ID           The comment ID.
95
	 * @param WP_Comment $comment              The comment object.
96
	 */
97
	return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment->comment_ID, $comment );
98
}
99
100
/**
101
 * Display the email of the author of the current global $comment.
@@ 115-129 (lines=15) @@
112
 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's email.
113
 *									 Default current comment.
114
 */
115
function comment_author_email( $comment_ID = 0 ) {
116
	$comment      = get_comment( $comment_ID );
117
	$author_email = get_comment_author_email( $comment );
118
119
	/**
120
	 * Filters the comment author's email for display.
121
	 *
122
	 * @since 1.2.0
123
	 * @since 4.1.0 The `$comment_ID` parameter was added.
124
	 *
125
	 * @param string $author_email The comment author's email address.
126
	 * @param int    $comment_ID   The comment ID.
127
	 */
128
	echo apply_filters( 'author_email', $author_email, $comment->comment_ID );
129
}
130
131
/**
132
 * Display the html email link to the author of the current comment.