check_comment_flood_db() WordPress Function

The check_comment_flood_db() function in WordPress is used to check whether a particular IP address has made too many comments in a given time period. If the IP address has made more than the allowed number of comments, the function will return true. Otherwise, it will return false.

check_comment_flood_db() #

Hooks WP’s native database-based comment-flood check.


Description

This wrapper maintains backward compatibility with plugins that expect to be able to unhook the legacy check_comment_flood_db() function from ‘check_comment_flood’ using remove_action().


Top ↑

Source

File: wp-includes/comment.php

function check_comment_flood_db() {
	add_filter( 'wp_is_comment_flood', 'wp_check_comment_flood', 10, 5 );
}


Top ↑

Changelog

Changelog
VersionDescription
4.7.0Converted to be an add_filter() wrapper.
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More