Skip to content

Commit

Permalink
remove unused private methods (#558)
Browse files Browse the repository at this point in the history
Antispam_Bee::_is_ipv6($ip) is unused since 2.9.2

Antispam_Bee::_reverse_ip($ip) is unused since at least 2.6.7
  • Loading branch information
stklcode committed Jan 14, 2024
1 parent 564ba3f commit a9ea206
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions antispam_bee.php
Original file line number Diff line number Diff line change
Expand Up @@ -2245,27 +2245,6 @@ private static function _anonymize_ip( $ip ) {
}


/**
* Rotates the IP address
*
* @since 2.4.5
*
* @param string $ip IP address.
* @return string Turned IP address.
*/
private static function _reverse_ip( $ip ) {
return implode(
'.',
array_reverse(
explode(
'.',
$ip
)
)
);
}


/**
* Check for an IPv4 address
*
Expand All @@ -2284,24 +2263,6 @@ private static function _is_ipv4( $ip ) {
}


/**
* Check for an IPv6 address
*
* @since 2.6.2
* @since 2.6.4
*
* @param string $ip IP to validate.
* @return boolean TRUE if IPv6.
*/
private static function _is_ipv6( $ip ) {
if ( function_exists( 'filter_var' ) ) {
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) !== false;
} else {
return ! self::_is_ipv4( $ip );
}
}


/**
* Testing on mobile devices
*
Expand Down

0 comments on commit a9ea206

Please sign in to comment.