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.


Top ↑

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


Top ↑

Return Return

(bool) True if the clearing of activity was successful, or false if IP could not be determined.


Top ↑

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;
}


Top ↑

Changelog Changelog

Changelog
Version Description
9.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.