WordPress函数wp_register()

鱼见海资源网最新教程:

描述

如果用户已登录,此标记将显示“站点管理”链接,如果用户未登录,则显示“注册”链接。

如果未选中管理 > 设置 > 常规 > 成员资格:任何人都可以注册框,则不提供“注册”链接。

用法

参数

$before
(string) (optional) Text to display before the Register or Site Admin link.
Default: ‘

$after
(string) (optional) Text to display after the Register or Site Admin link.
Default: ‘


$echo
(boolean) (optional) If true, echos the link, if false, returns the link as a string
Default: true

示例

默认
wp_register以列表格式
显示链接。

在连接前后不显示任何内容

The following code example displays the “Register” or “Site Admin” link with no text in before or after parameters.

当未登录的情况下,显示输出为:

Register

当在登录状态后,显示输出为:

Site Admin

文章来源于互联网

© 版权声明
THE END
喜欢就支持一下吧
点赞428 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容