diff --git a/README.md b/README.md index 65dec3e..e2491c6 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,19 @@ If you want to run the latest development version, you have two options: 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. +Customize Disabled User Message +------------ +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. + +```php + add_filter( 'disable_user_login.disabled_message', function( $disabled_message ) { + // Defaults to: __( 'ERROR: Account disabled.', 'disable-user-login' ) + $disabled_message = 'ERROR: Get outta here!'; + + return $disabled_message; + }, 10, 1 ); +``` + Bugs ---- If you think you've found a bug, [please raise an issue here](https://github.com/saintsystems/disable-user-login/issues?state=open). diff --git a/readme.txt b/readme.txt index f633a83..8cd8d02 100644 --- a/readme.txt +++ b/readme.txt @@ -39,7 +39,7 @@ This can be useful in a few situations. = Can I change the message a disabled user sees? = -Yes, there is a filter in place for that, `disable_user_login_notice`. +Yes, there is a filter in place for that, `disable_user_login.disabled_message`. == Screenshots ==