get_comment_author_email

函数
get_comment_author_email ( $comment_ID = 0 )
参数
  • (int|WP_Comment) $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's email. Default current comment.
    Required:
返回值
  • (string) The current comment author's email
定义位置
相关方法
get_comment_author_email_linkcomment_author_emailget_comment_author_ipget_comment_author_urlget_comment_author
引入
1.5.0
弃用
-

get_comment_author_email: 这个函数返回评论的作者的电子邮件地址。它需要一个参数,即$comment_ID,这是你想检索作者电子邮件的评论的ID。

检索当前评论的作者的电子邮件。

function get_comment_author_email( $comment_ID = 0 ) {
	$comment = get_comment( $comment_ID );

	/**
	 * Filters the comment author's returned email address.
	 *
	 * @since 1.5.0
	 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added.
	 *
	 * @param string     $comment_author_email The comment author's email address.
	 * @param string     $comment_ID           The comment ID as a numeric string.
	 * @param WP_Comment $comment              The comment object.
	 */
	return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment->comment_ID, $comment );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 21:36:41

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: