WP_FAIL2BAN_LOG_COMMENTS_EXTRA

Log extra comment events.

Default setting: disabled

Added in version 4.0.0.

Deprecated since version 5.0.0: See WP_FAIL2BAN_LOG_COMMENT_ATTEMPTS


Note

This constant has been deprecated in favor of WP_FAIL2BAN_LOG_COMMENT_ATTEMPTS.

Enables logging of specific comment-related events. The events are specified using event constants that must be OR’ed together.

Example: Enable logging for ‘Closed’ and ‘Draft’ posts
include __DIR__.'/wp-content/plugins/wp-fail2ban/lib/constants.php';

/**
 * Log comments on 'Closed' and 'Draft' posts
 */
define('WP_FAIL2BAN_LOG_COMMENTS_EXTRA', WPF2B_EVENT_COMMENT_CLOSED | WPF2B_EVENT_COMMENT_DRAFT);

The following events can be logged:

Event Constant

Description

WPF2B_EVENT_COMMENT_NOT_FOUND

Attempted comment on a non-existent post

WPF2B_EVENT_COMMENT_CLOSED

Attempted comment on a post with closed comments

WPF2B_EVENT_COMMENT_TRASH

Attempted comment on a post in Trash

WPF2B_EVENT_COMMENT_DRAFT

Attempted comment on a Draft post

WPF2B_EVENT_COMMENT_PASSWORD

Attempted comment on a password-protected post