常用函数-wp_loginout()

0条评论

说明

该函数显示一个登录链接。若用户已登录,该函数将显示登出链接。该函数可利用一个选择性重定向参数为登录/登出后的用户进行重定向。

用法

 <?php wp_loginout( $redirect ); ?> 

参数

$redirect

(字符串)(可选)登录/登出后进行重定向的URL。该参数始见于WP 2.8

默认值:None

示例

<p><?php wp_loginout(); ?></p>

注释

历史记录

  • 始见于WordPress 1.5.0版本

源文件

wp_loginout()位于wp-includes/general-template.php

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许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.