This function redirects a user who is not logged in to the login page (if one is set in the main options tab).
(string) (optional) URL to redirect back to following login. (default: false)
Redirect all content that is not the login page, register page, or user profile (for forgot password link) to the login page if the user is not logged in:
- The function automatically applies a redirect back to the requested page. You only need to pass a redirect_to argument in the function if you want to redirect to a URL that is not the requested URL.
- Introduced in version 3.0.2
- Moved to API in 3.1.1
- Added redirect_to argument in 3.1.3
wpmem_redirect_to_login() is located in /inc/api.php.