get_comment_author_url
云策文档标注
概述
get_comment_author_url 是一个 WordPress 过滤器钩子,用于过滤评论作者的 URL。它允许开发者在获取评论作者 URL 时修改或处理该值。
关键要点
- 过滤器名称:get_comment_author_url
- 参数:$comment_author_url(评论作者 URL 字符串)、$comment_id(评论 ID)、$comment(评论对象)
- 用途:在 get_comment_author_url() 函数中调用,用于自定义评论作者 URL 的输出
- 版本历史:从 WordPress 1.5.0 引入,4.1.0 版本添加了 $comment_id 和 $comment 参数
代码示例
return apply_filters( 'get_comment_author_url', $comment_author_url, $comment_id, $comment );
原文内容
Filters the comment author’s URL.
Parameters
$comment_author_urlstring-
The comment author’s URL, or an empty string.
$comment_idstring|int-
The comment ID as a numeric string, or 0 if not found.
$commentWP_Comment|null-
The comment object, or null if not found.
Source
return apply_filters( 'get_comment_author_url', $comment_author_url, $comment_id, $comment );