is_login()wp-includes/load.php | Determines whether the current request is for the login screen.
|
WP_Recovery_Mode_Link_Service::handle_begin_link()wp-includes/class-wp-recovery-mode-link-service.php | Enters recovery mode when the user hits wp-login.php with a valid recovery mode link.
|
WP_Recovery_Mode_Link_Service::get_recovery_mode_begin_url()wp-includes/class-wp-recovery-mode-link-service.php | Gets a URL to begin recovery mode.
|
wp_admin_bar_recovery_mode_menu()wp-includes/admin-bar.php | Adds a link to exit recovery mode when Recovery Mode is active.
|
wp_recovery_mode_nag()wp-admin/includes/update.php | Displays a notice when the user is in recovery mode.
|
wp_send_user_request()wp-includes/user.php | Send a confirmation request email to confirm an action.
|
WP_Customize_Manager::customize_pane_settings()wp-includes/class-wp-customize-manager.php | Prints JavaScript settings for parent window.
|
confirm_another_blog_signup()wp-signup.php | Shows a message confirming that the new site has been created.
|
network_step2()wp-admin/includes/network.php | Prints step 2 for Network installation process.
|
wp_new_blog_notification()wp-admin/includes/upgrade.php | Notifies the site admin that the installation of WordPress is complete.
|
wp_new_user_notification()wp-includes/pluggable.php | Emails login credentials to a newly-registered user.
|
auth_redirect()wp-includes/pluggable.php | Checks if a user is logged in, if not it redirects them to the login page.
|
wp_loginout()wp-includes/general-template.php | Displays the Log In/Out link.
|
wp_auth_check_html()wp-includes/functions.php | Outputs the HTML that shows the wp-login dialog when the user is no longer logged in.
|
register_new_user()wp-includes/user.php | Handles registering a new user.
|
wp_redirect_admin_locations()wp-includes/canonical.php | Redirects a variety of shorthand URLs to the admin.
|
wpmu_welcome_user_notification()wp-includes/ms-functions.php | Notifies a user that their account activation has been successful.
|
wpmu_validate_user_signup()wp-includes/ms-functions.php | Sanitizes and validates data required for a user sign-up.
|
wp_xmlrpc_server::initialise_blog_option_info()wp-includes/class-wp-xmlrpc-server.php | Sets up blog options property.
|
get_post_reply_link()wp-includes/comment-template.php | Retrieves HTML content for reply to post link.
|
comment_form()wp-includes/comment-template.php | Outputs a complete commenting form for use within a template.
|
get_comment_reply_link()wp-includes/comment-template.php | Retrieves HTML content for reply to comment link.
|
Login and Redirect to Current Page
For the redirect example to the current URL via
get_permalink()
above, note that if the request is a 404,get_permalink()
will returnfalse
, so you may want to grab the actual URL instead.A scenario where it could be useful to still redirect to your current URL even if it was a 404, would be if the current URL was a private post, and your user was not yet logged-in – hence ended up on a 404.
In that case, if you show them a login link, they should be redirected back to the current URL (i.e. the private post), so that they finally can access it.
Basic Example
To check with WP CLI:
wp eval "echo wp_login_url();"
Login and Redirect to Homepage