Skip to content

Commit a9ea206

Browse files
committed
remove unused private methods (#558)
Antispam_Bee::_is_ipv6($ip) is unused since 2.9.2 Antispam_Bee::_reverse_ip($ip) is unused since at least 2.6.7
1 parent 564ba3f commit a9ea206

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

Diff for: antispam_bee.php

-39
Original file line numberDiff line numberDiff line change
@@ -2245,27 +2245,6 @@ private static function _anonymize_ip( $ip ) {
22452245
}
22462246

22472247

2248-
/**
2249-
* Rotates the IP address
2250-
*
2251-
* @since 2.4.5
2252-
*
2253-
* @param string $ip IP address.
2254-
* @return string Turned IP address.
2255-
*/
2256-
private static function _reverse_ip( $ip ) {
2257-
return implode(
2258-
'.',
2259-
array_reverse(
2260-
explode(
2261-
'.',
2262-
$ip
2263-
)
2264-
)
2265-
);
2266-
}
2267-
2268-
22692248
/**
22702249
* Check for an IPv4 address
22712250
*
@@ -2284,24 +2263,6 @@ private static function _is_ipv4( $ip ) {
22842263
}
22852264

22862265

2287-
/**
2288-
* Check for an IPv6 address
2289-
*
2290-
* @since 2.6.2
2291-
* @since 2.6.4
2292-
*
2293-
* @param string $ip IP to validate.
2294-
* @return boolean TRUE if IPv6.
2295-
*/
2296-
private static function _is_ipv6( $ip ) {
2297-
if ( function_exists( 'filter_var' ) ) {
2298-
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 ) !== false;
2299-
} else {
2300-
return ! self::_is_ipv4( $ip );
2301-
}
2302-
}
2303-
2304-
23052266
/**
23062267
* Testing on mobile devices
23072268
*

0 commit comments

Comments
 (0)