您的当前位置:首页 > 知识博客 > wordpress建站

WordPress跳转到登录页面函数:auth_redirect

时间:2024-03-09

WordPress函数auth_redirect用于跳转到登录页面,该函数自动将当前页面地址传递到登录页面的redirect_to参数,以便在登录后返回到当前页。

auth_redirect()

函数使用示例

if(!is_user_logged_in()) {
	auth_redirect();
}

扩展阅读

auth_redirect()函数位于:wp-includes/pluggable.php

相关函数:

  • wp_redirect()

  • secure_auth_redirect()

  • auth_redirect_scheme()

  • wp_validate_auth_cookie()


欢迎咨询/Welcome to inquire
tel/vx:18842938855
qq:1685522781
email:1685522781@qq.com

Copyright © 2019-2024 sex.cyou


Whatsapp
Powered by RRZCMS