Skip to content

Commit 6b17dbf

Browse files
authored
Update README.md
Add details on hook for customizing disabled message.
1 parent 9e0dd0c commit 6b17dbf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
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).

0 commit comments

Comments
 (0)