## Actions ## The following actions can be used to leverage Apocalypse Meow to track arbitrary login successes and failures in any custom form. The usual plugin settings for things like fail windows, etc., still apply. ### meow_log_ban ### This action causes an IP address or subnet to be temporarily banned from logging in. ``` '', // The IP address. 'subnet'=>'', // The subnet. 'date_created'=>'0000-00-00 00:00:00', // The creation datetime. 'date_expires'=>'0000-00-00 00:00:00', // The expiration datetime. 'type'=>'ban', // The type of action performed. 'username'=>'', // The username submitted, if any; this does not apply to "ban". 'count'=>1, // The number of times the ban error was shown to a blocked visitor, e.g. "persistence". This is only meaningful for "ban" actions. ); // Use it like: add_action('meow_logged_ban', 'my_callback_function', 10, 1); function my_callback_function($args) { ... } ``` Because a ban applies to an IP address *or* a subnet, but not both, one will contain a proper value, the other will be set to `"0"`. For fail and success types, both values will be set. ### meow_logged_fail ### This action is fired when someone has submitted an invalid login attempt. This action comes with a single argument, an array. See `meow_logged_ban` for details. ### meow_logged_success ### This action is fired when someone has successfully logged in. This action comes with a single argument, an array. See `meow_logged_ban` for details. --- ## Filters ## The following filters can be used to access Apocalypse Meow data in a clean way. They aren't necessarily intended to be hooked into via `add_filter()`, but I suppose you could. :) ### meow_failures_remaining ### Returns the number of failures remaining for a given visitor. Both IP- and Subnet-based limits are checked; the lower of the two values (i.e. the one that will hit sooner) is returned. ```