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/integrations/class-main-wp.php +6 -7 5.6.0 → 6.3.0 View file →
@@ -49,25 +49,26 @@
49 49 * @param bool $enable True to enable whitelisting, false otherwise.
50 50 *
51 51 * @since 5.0.2
52 52 */
53 - return (bool) apply_filters( 'wpdef_firewall_whitelist_mainwp_dashboard_public_ip_enabled', true );
53 + $enabled = apply_filters( 'wpdef_firewall_whitelist_mainwp_dashboard_public_ip_enabled', true );
54 + return is_bool( $enabled ) ? $enabled : (bool) $enabled;
54 55 }
55 56
56 57 /**
57 58 * Whitelist MainWP dashboard site's public IP.
58 59 *
59 - * @return bool
60 + * @return void
60 61 */
61 - public function set_whitelist_dashboard_public_ip(): bool {
62 + public function set_whitelist_dashboard_public_ip(): void {
62 63 if ( ! $this->is_whitelist_dashboard_public_ip_enabled() ) {
63 - return false;
64 + return;
64 65 }
65 66
66 67 $ips = $this->get_user_ip();
67 68
68 69 if ( array() === $ips ) {
69 - return false;
70 + return;
70 71 }
71 72
72 73 $stored_ips = $this->get_whitelist_dashboard_public_ip();
73 74 $stored_ips = array_unique( $stored_ips );
@@ -78,10 +79,8 @@
78 79
79 80 if ( $stored_ips !== $ips ) {
80 81 update_site_option( self::WHITELIST_DASHBOARD_PUBLIC_IP_OPTION, $ips );
81 82 }
82 -
83 - return true;
84 83 }
85 84
86 85 /**
87 86 * Get the whitelisted MainWP dashboard site's public IP.