Skip to content
Permalink
Browse files

Docs: Improve documentation for `auth_redirect()`.

Props atachibana.
Fixes #47956.

git-svn-id: https://develop.svn.wordpress.org/trunk@45924 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Sep 1, 2019
1 parent 27c877e commit e2b68a42530472774831927ea03cf51a7f54b81e
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/wp-includes/pluggable.php
@@ -1005,6 +1005,11 @@ function is_user_logged_in() {
/**
* Checks if a user is logged in, if not it redirects them to the login page.
*
* When this code is called from a page, it checks to see if the user viewing the page is logged in.
* If the user is not logged in, they are redirected to the login page. The user is redirected
* in such a way that, upon logging in, they will be sent directly to the page they were originally
* trying to access.
*
* @since 1.5.0
*/
function auth_redirect() {

0 comments on commit e2b68a4

Please sign in to comment.
You can’t perform that action at this time.