Skip to content

Commit 8295729

Browse files
committed
2 parents 0ae26c0 + 049cd55 commit 8295729

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ If you want to run the latest development version, you have two options:
3232

3333
This will download the latest development version of the Disable User Login plugin. While this version is usually stable, it is not recommended for use in a production environment.
3434

35+
Customize Disabled User Message
36+
------------
37+
You can customize the message users see when their accounts are disabled by hooking into the `disable_user_login.disabled_message` hook exposed by the plugin or by providing a translation in your languages file.
38+
39+
```php
40+
add_filter( 'disable_user_login.disabled_message', function( $disabled_message ) {
41+
// Defaults to: __( '<strong>ERROR</strong>: Account disabled.', 'disable-user-login' )
42+
$disabled_message = '<strong>ERROR</strong>: Get outta here!';
43+
44+
return $disabled_message;
45+
}, 10, 1 );
46+
```
47+
3548
Bugs
3649
----
3750
If you think you've found a bug, [please raise an issue here](https://github.com/saintsystems/disable-user-login/issues?state=open).

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This can be useful in a few situations.
3939

4040
= Can I change the message a disabled user sees? =
4141

42-
Yes, there is a filter in place for that, `disable_user_login_notice`.
42+
Yes, there is a filter in place for that, `disable_user_login.disabled_message`.
4343

4444
== Screenshots ==
4545

0 commit comments

Comments
 (0)