get_comment_author_ip

过滤钩子
apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment )
参数
  • (string) $comment_author_ip The comment author's IP address, or an empty string if it's not available.
    Required:
  • (string) $comment_ID The comment ID as a numeric string.
    Required:
  • (WP_Comment) $comment The comment object.
    Required:
定义位置
相关勾子
get_comment_authorget_comment_author_linkget_comment_author_emailget_comment_author_urlget_comment_author_url_link
相关方法
get_comment_author_ipget_comment_authorget_comment_author_linkget_comment_author_emailcomment_author_ipget_comment_author_url
引入
4.1.0
弃用
-

get_comment_author_ip: 这个函数检索给定评论的作者的IP地址: 该函数接受一个参数,即评论ID,并返回一个代表IP地址的字符串。

过滤评论作者返回的IP地址。

return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-05 18:32:58

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

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

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