常用函数-auth_redirect()

0条评论

常用函数-auth_redirect()

说明

auth_redirect()

是一个简单函数,要求用户访问页面前登录。

缺省用法

<?php auth_redirect() ?>

页面调用此代码时,代码会查看访问当前页面的用户是否登录。如果用户未登录则将用户重定向至登录页面。登录后可将用户直接转到登录前所访问的页面。

参数

该函数不接受参数。

相关资源

is_user_logged_in(), wp_redirect()

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • 自动断行和分段。

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.