| @@ -52,9 +52,9 @@ | ||
| 52 | 52 | */ |
| 53 | 53 | public function get_default_values(): array { |
| 54 | 54 | return array( |
| 55 | 55 | 'message' => esc_html__( |
| 56 | - 'You are required to change your password because the password you are using exists on database breach records.', | |
| 56 | + 'This password has been exposed in a data breach and can’t be used. Choose a different password.', | |
| 57 | 57 | 'defender-security' |
| 58 | 58 | ), |
| 59 | 59 | ); |
| 60 | 60 | } |
| @@ -97,12 +97,14 @@ | ||
| 97 | 97 | * |
| 98 | 98 | * @return bool |
| 99 | 99 | */ |
| 100 | 100 | public function is_active(): bool { |
| 101 | - return (bool) apply_filters( | |
| 101 | + $enable = apply_filters( | |
| 102 | 102 | 'wd_password_protection_enable', |
| 103 | 103 | $this->enabled && count( $this->user_roles ) > 0 |
| 104 | 104 | ); |
| 105 | + | |
| 106 | + return is_bool( $enable ) ? $enable : (bool) $enable; | |
| 105 | 107 | } |
| 106 | 108 | |
| 107 | 109 | /** |
| 108 | 110 | * Returns the module name for Pwned Passwords. |