PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/traits/ip.php +4 -2 5.6.1 → 6.3.0 View file →
@@ -330,9 +330,10 @@
330 330 }
331 331 }
332 332
333 333 // @since 2.6.3
334 - return (array) apply_filters( 'wd_display_ip_validations', $errors );
334 + $errors = apply_filters( 'wd_display_ip_validations', $errors );
335 + return is_array( $errors ) ? $errors : (array) $errors;
335 336 }
336 337
337 338 /**
338 339 * Validate IP.
@@ -525,9 +526,10 @@
525 526 * @since 5.3.0
526 527 *
527 528 * @param array $trusted_ips An array of trusted server IP addresses.
528 529 */
529 - $trusted_ips = (array) apply_filters( 'wp_defender_server_ips', array_unique( $trusted_ips ) );
530 + $trusted_ips = apply_filters( 'wp_defender_server_ips', array_unique( $trusted_ips ) );
531 + $trusted_ips = ! is_array( $trusted_ips ) ? (array) $trusted_ips : $trusted_ips;
530 532 // Only return true if the request IP is in the trusted list.
531 533 if ( array() !== array_intersect( $user_ips, $trusted_ips ) ) {
532 534 return true;
533 535 }