llms_clear_spam_activity( string|null $ip = null )
Clears all stored spam activity for an IP address.
Description Description
Note that the llms_get_spam_activity function clears out old values automatically, and this should only be used to completely clear the activity.
Parameters Parameters
- $ip
-
(string|null) (Optional) The IP address to clear activity for, or leave as null to attempt to determine current IP address.
Default value: null
Return Return
(bool) True if the clearing of activity was successful, or false if IP could not be determined.
Source Source
File: includes/llms.spam.functions.php
function llms_clear_spam_activity( $ip = null ) {
if ( empty( $ip ) ) {
$ip = llms_get_ip_address();
}
// If we can't determine the IP, let's bail.
if ( empty( $ip ) ) {
return false;
}
$transient_key = 'llms_spam_activity_' . $ip;
delete_transient( $transient_key );
return true;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 9.0.0 | Introduced. |