From 6b17dbfcf27ad6c3f7247fc97ac66753a80e8b60 Mon Sep 17 00:00:00 2001 From: Adam Anderly Date: Fri, 21 Jan 2022 09:15:40 -0600 Subject: [PATCH 1/2] Update README.md Add details on hook for customizing disabled message. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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). From 049cd5561ca057648fd53c95fcda1e767dbd7e54 Mon Sep 17 00:00:00 2001 From: Adam Anderly Date: Mon, 9 May 2022 09:21:28 -0500 Subject: [PATCH 2/2] Update readme.txt --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index d736f10..351c456 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 ==