-
Notifications
You must be signed in to change notification settings - Fork 13
Actions
Brandon Allen edited this page May 31, 2017
·
5 revisions
This action fires immediately WP Fail2Ban Redux is loaded. You can use this action to bootstrap custom logging actions.
Example usage:
// Load only after WP Fail2Ban Redux is loaded.
function my_wp_fail2ban_redux_init() {
// Do something fun here or add dependent actions.
}
add_action( 'wp_fail2ban_redux_loaded', 'my_wp_fail2ban_redux_init' );
This action fires before WP Fail2Ban Redux calls wp_die()
. This action can be used to return an HTTP headers other than the default.
Example usage:
// Returns a 404 header on user enumeration attempts.
function my_wp_fail2ban_redux_exit( $action ) {
if ( 'user_enumeration' === $action ) {
wp_die(
'Why, I oughta!',
'Why, I oughta!',
array(
'response' => 404,
)
);
}
}
add_action( 'wp_fail2ban_redux_exit', 'my_wp_fail2ban_redux_exit' );