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 ...)
 
无编辑摘要
第1行: 第1行:
==Description==
==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 [[WordPress:Administration_Panels|Administration]] > [[WordPress:Administration_Panels#General|Settings]] > [[WordPress:Settings_General_SubPanel|General]] > '''Membership: Anyone can register''' box is checked.  The '''Register''' link causes the <tt>/wp-register.php</tt> script to execute and '''Site Admin''' links to <tt>/wp-admin/index.php</tt>.   
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 [[WordPress:Administration_Panels|Administration]] > [[WordPress:Administration_Panels#General|Settings]] > [[WordPress:Settings_General_SubPanel|General]] > '''Membership: Anyone can register''' box is checked.  The '''Register''' link causes the <tt>/wp-register.php</tt> script to execute and '''Site Admin''' links to <tt>/wp-admin/index.php</tt>.   
这个标签显示了"注册"链接,链接到没有登录的用户或者显示了"站点管理"链接,链接到已经登录的用户。当[[WordPress:Administration_Panels|管理]] > [[WordPress:Administration_Panels#General|设置]] > [[WordPress:Settings_General_SubPanel|总的]] > '''成员资格:选中了任何人都可以注册'''这个框,就可以拥有"注册"链接。'''注册'''链接导致<tt>/wp-register.php</tt>脚本得到执行而且'''站点管理'''链接到<tt>/wp-admin/index.php</tt>。


This tag became available beginning with WordPress 1.5.
This tag became available beginning with WordPress 1.5.
从WordPress1.5版本开始,就有了这个标签。


This tag does not function as intended on [[WordPress:WordPressMU|WordPress &micro;]].
This tag does not function as intended on [[WordPress:WordPressMU|WordPress &micro;]].
这个标签并不像[[WordPress:WordPressMU|WordPress &micro;]]上那样地运行。


== Usage ==
== Usage ==


%%% <?php wp_register('before', 'after'); ?> %%%
%%% <?php wp_register('before', 'after'); ?> %%%
== 用法 ==
%%% <?php wp_登录('之前', '之后'); ?> %%%


=== Parameters ===
=== Parameters ===
===参数===


; '''before''' (''string''): Text to display before the Register or Site Admin link. Default is <tt>'&lt;li&gt;'</tt>.
; '''before''' (''string''): Text to display before the Register or Site Admin link. Default is <tt>'&lt;li&gt;'</tt>.
; '''之前''' (''string''):注册或者站点管理链接之前显示的文本。默认为<tt>'&lt;li&gt;'</tt>。


; '''after''' (''string''): Text to display after the Register or Site Admin link. Default is <tt>'&lt;/li&gt;'</tt>.
; '''after''' (''string''): Text to display after the Register or Site Admin link. Default is <tt>'&lt;/li&gt;'</tt>.
; '''之后''' (''string''):注册或者站点管理链接之后显示的文本。默认为<tt>'&lt;/li&gt;'</tt>。


== Examples ==
== Examples ==


=== Default Usage ===
=== Default Usage ===
== 例子==
=== 默认用法===


''wp_register'' displays the link in list format <tt><nowiki><li></nowiki></tt>.
''wp_register'' displays the link in list format <tt><nowiki><li></nowiki></tt>.


  <?php wp_register(); ?>  
  <?php wp_register(); ?>  
''wp_注册'' 在格式为<tt><nowiki><li></nowiki></tt>的列表中显示了链接。 .
<?php wp_注册(); ?>


=== Display Without Text Before or After ===
=== 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.
The following code example displays the "Register" or "Site Admin" link with no text in '''before''' or '''after''' parameters.
下面的代码例子显示了"注册" 或者"站点管理"链接,但是参数的'''前面''' 或者 '''后面'''都没有文本。


  <?php wp_register(&#39;&#39;, &#39;&#39;); ?>  
  <?php wp_register(&#39;&#39;, &#39;&#39;); ?>  
== WordPress &#181; ==
<?php wp_注册(&#39;&#39;, &#39;&#39;); ?>


== WordPress &#181; ==
== WordPress &#181; ==


On [[WordPress:WordPressMU|WordPress &#181;]], 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.
On [[WordPress:WordPressMU|WordPress &#181;]], 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:WordPressMU|WordPress &#181;]],没有/wp-register.php文件,而且 /wp-login.php?action=register不是一个有效的注册形式。因此,''wp_注册''不显示注册链接。


== Related ==
== Related ==
第40行: 第79行:


{{PHP Function Tag Footer}}
{{PHP Function Tag Footer}}
== 相关的==
{{标签 总标签}}
{{PHP 函数 标签 页底文字}}

2008年7月3日 (四) 17:22的版本

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_注册不显示注册链接。

Related

模板:Tag General Tags

模板:PHP Function Tag Footer

相关的

模板:标签 总标签

模板:PHP 函数 标签 页底文字