wp_check_comment_disallowed_list

動作鉤子
do_action( 'wp_check_comment_disallowed_list', $author, $email, $url, $comment, $user_ip, $user_agent )
引數
  • (string) $author Comment author.
    Required:
  • (string) $email Comment author's email.
    Required:
  • (string) $url Comment author's URL.
    Required:
  • (string) $comment Comment content.
    Required:
  • (string) $user_ip Comment author's IP address.
    Required:
  • (string) $user_agent Comment author's browser user agent.
    Required:
定義位置
相關勾子
check_comment_floodwp_update_comment_datawp_is_comment_floodpre_comment_user_ippre_comment_on_post
相關方法
wp_check_comment_disallowed_listwp_check_comment_floodwp_check_comment_data_max_lengthscheck_comment_flood_dbwp_throttle_comment_floodwp_check_locked_posts
引入
5.5.0
棄用
-

wp_check_comment_disallowed_list 函式是一個 WordPress 核心函式: 這個函式用於檢查評論是否在 WordPress 禁止評論列表中。如果評論中包含的電子郵件地址或 IP 地址在禁止評論列表中,則此函式將返回 true,否則返回 false。

在評論被測試為不允許的字元或單詞之前觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'wp_check_comment_disallowed_list', $author, $email, $url, $comment, $user_ip, $user_agent );
do_action( 'wp_check_comment_disallowed_list', $author, $email, $url, $comment, $user_ip, $user_agent );
do_action( 'wp_check_comment_disallowed_list', $author, $email, $url, $comment, $user_ip, $user_agent );

常見問題

FAQs
檢視更多 >