WordPress: Template Tags/single tag title:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: == Description == Displays or returns the tag title for the current page. == Usage == %%% <?php single_tag_title('prefix', 'display'); ?> %%% == Examples == This example displays the ...)
 
无编辑摘要
第1行: 第1行:
== Description ==
== Description ==
== 描述 ==
Displays or returns the tag title for the current page.
Displays or returns the tag title for the current page.
显示或者返回当前网页的标签标题。
== Usage ==


== Usage ==
== 用法 ==
 
%%% <?php single_tag_title('prefix', 'display'); ?> %%%


%%% <?php single_tag_title('prefix', 'display'); ?> %%%
%%% <?php single_tag_title('prefix', 'display'); ?> %%%


== Examples ==
== Examples ==
== 例子 ==


This example displays the text "'''Currently browsing '''" followed by the tag title.
This example displays the text "'''Currently browsing '''" followed by the tag title.
 
这个例子显示了文本"'''当前浏览'''",后面是标签标题。
  &lt;p&gt;<?php single_tag_title('Currently browsing '); ?>.&lt;/p&gt;
  &lt;p&gt;<?php single_tag_title('Currently browsing '); ?>.&lt;/p&gt;


<div style="border:1px solid blue; width:50%; padding:10px">Currently browsing WordPress.</div>
<div style="border:1px solid blue; width:50%; padding:10px">Currently browsing WordPress.</div>
&lt;p&gt;<?php single_tag_title('Currently browsing '); ?>.&lt;/p&gt;
<div style="border:1px solid blue; width:50%; padding:10px">当前浏览WordPress。</div>




This example assigns the current tag title to the variable $current_tag for use in PHP.
This example assigns the current tag title to the variable $current_tag for use in PHP.
这个例子将当前的标签标题递交到变数$current_tag,以供在PHP中使用。


  <?php $current_tag = single_tag_title("", false); ?>
  <?php $current_tag = single_tag_title("", false); ?>
<?php $current_tag = single_tag_title("", false); ?>


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


; prefix : (''string'') Text to output before the tag title. Defaults to <tt>&#39;&#39;</tt> (no text).
; prefix : (''string'') Text to output before the tag title. Defaults to <tt>&#39;&#39;</tt> (no text).
;前缀:(''string'')标签标题之前的文本。默认为<tt>&#39;&#39;</tt> (没有文本)。
; display : (''boolean'') Display the tag's title (<tt>TRUE</tt>) or return it for use in PHP (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>.
; display : (''boolean'') Display the tag's title (<tt>TRUE</tt>) or return it for use in PHP (<tt>FALSE</tt>). Defaults to <tt>TRUE</tt>.
;显示:(''boolean'')显示标签的标题(<tt>正确的</tt>)或者将标题返回用于PHP(<tt>错误的</tt>)。默认为<tt>正确的</tt>。
== Related ==


== Related ==
== 相关的 ==


{{Tag Tag Tags}}
{{Tag Tag Tags}}


{{PHP Function Tag Footer}}
{{PHP Function Tag Footer}}
{{标签标签 标签}}
{{PHP函数标签页底文字}}

2008年7月10日 (四) 16:32的版本

Description

描述

Displays or returns the tag title for the current page. 显示或者返回当前网页的标签标题。

Usage

用法

%%% <?php single_tag_title('prefix', 'display'); ?> %%%

%%% <?php single_tag_title('prefix', 'display'); ?> %%%

Examples

例子

This example displays the text "Currently browsing " followed by the tag title. 这个例子显示了文本"当前浏览",后面是标签标题。

<p><?php single_tag_title('Currently browsing '); ?>.</p>
Currently browsing WordPress.


<p><?php single_tag_title('Currently browsing '); ?>.</p>

当前浏览WordPress。


This example assigns the current tag title to the variable $current_tag for use in PHP.

这个例子将当前的标签标题递交到变数$current_tag,以供在PHP中使用。

<?php $current_tag = single_tag_title("", false); ?>

<?php $current_tag = single_tag_title("", false); ?>

Parameters

参数

prefix
(string) Text to output before the tag title. Defaults to '' (no text).

;前缀:(string)标签标题之前的文本。默认为'' (没有文本)。

display
(boolean) Display the tag's title (TRUE) or return it for use in PHP (FALSE). Defaults to TRUE.

;显示:(boolean)显示标签的标题(正确的)或者将标题返回用于PHP(错误的)。默认为正确的

Related

相关的

模板:Tag Tag Tags

模板:PHP Function Tag Footer


模板:标签标签 标签