From 79cc0cdbe15ca28cf4588ebcc251a735f515d2fc Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 25 Mar 2026 20:55:47 +0100 Subject: [PATCH 1/2] Update readme.txt --- readme.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/readme.txt b/readme.txt index 18d0cd42..c8d65a22 100644 --- a/readme.txt +++ b/readme.txt @@ -103,6 +103,14 @@ Here is a list of action and filter hooks provided by the plugin: - `two_factor_after_authentication_input`action which receives the provider object and fires after the input shown on the authentication input form (if form contains no input, action fires immediately after `two_factor_after_authentication_prompt`). - `two_factor_login_backup_links` filters the backup links displayed on the two-factor login form. +== Redirect After the Two-Factor Challenge == + +To redirect users to a specific URL after completing the two-factor challenge, use the `login_redirect` filter: + + add_filter( 'login_redirect', function( $redirect_to, $requested_redirect_to, $user ) { + return home_url( '/dashboard/' ); + }, 10, 3 ); + == Frequently Asked Questions == = What PHP and WordPress versions does the Two-Factor plugin support? = From 6cafd30f20d19daac7267354062ac4fbc95966ac Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 26 Mar 2026 09:55:38 +0100 Subject: [PATCH 2/2] specify filter is from WP core --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index c8d65a22..f6fa2497 100644 --- a/readme.txt +++ b/readme.txt @@ -105,7 +105,7 @@ Here is a list of action and filter hooks provided by the plugin: == Redirect After the Two-Factor Challenge == -To redirect users to a specific URL after completing the two-factor challenge, use the `login_redirect` filter: +To redirect users to a specific URL after completing the two-factor challenge, use WordPress Core built-in login_redirect filter. The filter works the same way as in a standard WordPress login flow: add_filter( 'login_redirect', function( $redirect_to, $requested_redirect_to, $user ) { return home_url( '/dashboard/' );