wp_blacklist_check

函式
wp_blacklist_check ( $author, $email, $url, $comment, $user_ip, $user_agent )
引數
  • (string) $author The author of the comment
    Required:
  • (string) $email The email of the comment
    Required:
  • (string) $url The url used in the comment
    Required:
  • (string) $comment The comment content
    Required:
  • (string) $user_ip The comment author's IP address
    Required:
  • (string) $user_agent The author's browser user agent
    Required:
返回值
  • (bool) True if comment contains disallowed content, false if comment does not
定義位置
相關方法
wp_auth_checkwp_kses_attr_checkwp_list_pluckwp_playlist_shortcodewp_auth_check_html
引入
1.5.0
棄用
5.5.0

wp_blacklist_check: 這個函式用來檢查一個評論是否包含黑名單上的詞。

評論是否包含不允許的字元或詞語。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
_deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' );
return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent );
}
function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) { _deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' ); return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent ); }
function wp_blacklist_check( $author, $email, $url, $comment, $user_ip, $user_agent ) {
	_deprecated_function( __FUNCTION__, '5.5.0', 'wp_check_comment_disallowed_list()' );

	return wp_check_comment_disallowed_list( $author, $email, $url, $comment, $user_ip, $user_agent );
}

常見問題

FAQs
檢視更多 >