WordPress:Template Tags/wp register
Description
描述
This tag displays either the "Register" link to users that are not logged in or the "Site Admin" link if a user is logged in. The "Register" link is only offered if the Administration > Settings > General > Membership: Anyone can register box is checked. The Register link causes the /wp-register.php script to execute and Site Admin links to /wp-admin/index.php.
这个标签显示了"注册"链接,链接到没有登录的用户或者显示了"站点管理"链接,链接到已经登录的用户。当管理 > 设置 > 总的 > 成员资格:选中了任何人都可以注册这个框,就可以拥有"注册"链接。注册链接导致/wp-register.php脚本得到执行而且站点管理链接到/wp-admin/index.php。
This tag became available beginning with WordPress 1.5.
从WordPress1.5版本开始,就有了这个标签。
This tag does not function as intended on WordPress µ.
这个标签并不像WordPress µ上那样地运行。
Usage
%%% <?php wp_register('before', 'after'); ?> %%%
用法
%%% <?php wp_登录('之前', '之后'); ?> %%%
Parameters
参数
- before (string)
- Text to display before the Register or Site Admin link. Default is '<li>'.
- 之前 (string)
- 注册或者站点管理链接之前显示的文本。默认为'<li>'。
- after (string)
- Text to display after the Register or Site Admin link. Default is '</li>'.
- 之后 (string)
- 注册或者站点管理链接之后显示的文本。默认为'</li>'。
Examples
Default Usage
例子
默认用法
wp_register displays the link in list format <li>.
<?php wp_register(); ?>
wp_注册 在格式为<li>的列表中显示了链接。 .
<?php wp_注册(); ?>
Display Without Text Before or After
之前或者之后都没有文本
The following code example displays the "Register" or "Site Admin" link with no text in before or after parameters.
下面的代码例子显示了"注册" 或者"站点管理"链接,但是参数的前面 或者 后面都没有文本。
<?php wp_register('', ''); ?>
WordPress µ
<?php wp_注册('', ''); ?>
WordPress µ
On WordPress µ, there is no /wp-register.php file, and /wp-login.php?action=register is not a valid registration form. Thus, wp_register does not show a registration link.
在WordPress µ,没有/wp-register.php文件,而且 /wp-login.php?action=register不是一个有效的注册形式。因此,wp_注册不显示注册链接。