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地址。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase

常見問題

FAQs
檢視更多 >