Description
A filter for the url that the user is directed to on logout (default is the home page).
Parameters
$redirect_to
(string)(optional) The current URL being redirected to.
Usage
// Basic Example add_filter( 'wpmem_logout_redirect', 'my_logout_redirect_1' ); function my_logout_redirect_1( $redirect_to ) { // return the url that the logout should redirect to return 'https://yourdomain.com/your-page'; } // Better Example using home_url() add_filter( 'wpmem_logout_redirect', 'my_logout_redirect_2' ); function my_logout_redirect_2( $redirect_to ) { return home_url( 'your-page' ); }
Changelog
- Introduced in 2.7.1
- 3.1.7 Moved to WP_Members_Users object class
Source
wpmem_login_redirect is located in /inc/class-wp-members-form.php