WordPress: Template Tags/get links list:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: {{Deprecated}} == Description == Displays a nested HTML unordered list of all links as defined in the WordPress:Links Manager, sorted under [[WordPress:Li...)
 
无编辑摘要
第1行: 第1行:
{{Deprecated}}
{{Deprecated}}
== Description ==
== Description ==
{{取消的}}
== 描述 ==


Displays a nested [[WordPress:Glossary#HTML|HTML]] unordered list of all links as defined in the [[WordPress:Links Manager]], sorted under [[WordPress:Link_Categories_SubPanel|Link Category]] headings.  '''Note:''' the Link Category headings are automatically generated inside of <tt>&lt;h2></tt> headings.
Displays a nested [[WordPress:Glossary#HTML|HTML]] unordered list of all links as defined in the [[WordPress:Links Manager]], sorted under [[WordPress:Link_Categories_SubPanel|Link Category]] headings.  '''Note:''' the Link Category headings are automatically generated inside of <tt>&lt;h2></tt> headings.
显示[[WordPress:Links Manager|链接管理器]]中定义的所有的链接嵌套的[[WordPress:Glossary#HTML|HTML]]无序列表,这些链接是在[[WordPress:Link_Categories_SubPanel|链接类别]]标题下面分类的。'''注:'''链接类别标题是自动地在<tt>&lt;h2></tt>标题内部产生的。


'''Note''':  This tag does ''not'' respect the "Before Link", "Between Link and Description", and "After Link" settings defined for Link Categories in the [[WordPress:Links Manager]], Formatting (but respect Category Options, Show, Description).  To get around this feature/limitation, see [[WordPress:Template_Tags/wp_get_links#Include_Before_and_After_Text|Example 2]] from <tt>[[WordPress:Template_Tags/wp_get_links|wp_get_links()]]</tt>.
'''Note''':  This tag does ''not'' respect the "Before Link", "Between Link and Description", and "After Link" settings defined for Link Categories in the [[WordPress:Links Manager]], Formatting (but respect Category Options, Show, Description).  To get around this feature/limitation, see [[WordPress:Template_Tags/wp_get_links#Include_Before_and_After_Text|Example 2]] from <tt>[[WordPress:Template_Tags/wp_get_links|wp_get_links()]]</tt>.
'''注''':这个标签''不'' respect "链接之前","链接和描述之间",和"链接之后"设置,这些设置是为[[WordPress:Links Manager|链接管理器]]中的链接类别定义的,格式(但是这个标签respect类别选项,显示,描述)。要避开这个feature/局限性,请看看<tt>[[WordPress:Template_Tags/wp_get_links|wp_get_links()]]</tt>中的[[WordPress:Template_Tags/wp_get_links#Include_Before_and_After_Text|例 2]]。


== Replace With ==
== Replace With ==
== 取代 ==
[[WordPress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]].


[[WordPress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]].
[[WordPress:Template_Tags/wp_list_bookmarks|wp_list_bookmarks()]].


== Usage ==
== Usage ==
== 用法 ==
%%% <?php get_links_list('order'); ?> %%%


%%% <?php get_links_list('order'); ?> %%%
%%% <?php get_links_list('order'); ?> %%%


== Example ==
== Example ==
==例子 ==


Display links sorted by Link Category ID.
Display links sorted by Link Category ID.
显示根据链接类别ID分类的链接。
<?php get_links_list('id'); ?>


  <?php get_links_list('id'); ?>  
  <?php get_links_list('id'); ?>  


Automatically generates the <tt>&lt;li></tt> with an ID of the ''Link Category'' wrapped in an <tt>&lt;h2></tt> heading. It looks like this (links edited for space):
Automatically generates the <tt>&lt;li></tt> with an ID of the ''Link Category'' wrapped in an <tt>&lt;h2></tt> heading. It looks like this (links edited for space):
自动产生<tt>&lt;li></tt>和''链接 类别''的ID,在<tt>&lt;h2></tt>标题的下面,看起来就像(为空格编辑的链接):
<pre><li id="linkcat-1"><h2>Blogroll</h2>
  <ul>
      <li><a href="http://example1.com/">Blogroll Link 1</a></li>
      <li><a href="http://example2.com/">Blogroll Link 2</a></li>
      <li><a href="http://example3.com/">Blogroll Link 3</a></li>
    </ul>
</li></pre>


<pre><li id="linkcat-1"><h2>Blogroll</h2>
<pre><li id="linkcat-1"><h2>Blogroll</h2>
第31行: 第62行:


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


; order : (''string'') Value to sort Link Categories by. Valid values:
; order : (''string'') Value to sort Link Categories by. Valid values:
;顺序:(''string'')给链接类别分类的参数值。有效的参数值:
:* <tt>'name'</tt> (Default)
:* <tt>'name'</tt> (Default)
:* <tt>'名称'</tt> (默认)
:* <tt>'id'</tt>
:* <tt>'id'</tt>
:* <tt>'id'</tt>
: '''Prefixing the above options with an underscore (ex: '''<tt>'_id'</tt>''') sorts links in reverse order.'''
: '''Prefixing the above options with an underscore (ex: '''<tt>'_id'</tt>''') sorts links in reverse order.'''
: '''用一个下划线作为上述选项的前缀(例如: '''<tt>'_id'</tt>''') 用相反的顺序给链接分类。'''


== Related ==
== Related ==
第42行: 第86行:


{{PHP Function Tag Footer}}
{{PHP Function Tag Footer}}
== 相关的==
{{标签链接管理器链接}}
{{PHP 函数标签页底文字}}

2008年7月8日 (二) 14:20的版本

模板:Deprecated

Description


This function has been deprecated. That means it has been replaced by a new function or is no longer supported, and may be removed from future versions. All code that uses this function should be converted to use its replacement if one exists.


描述

Displays a nested HTML unordered list of all links as defined in the WordPress:Links Manager, sorted under Link Category headings. Note: the Link Category headings are automatically generated inside of <h2> headings.

显示链接管理器中定义的所有的链接嵌套的HTML无序列表,这些链接是在链接类别标题下面分类的。注:链接类别标题是自动地在<h2>标题内部产生的。

Note: This tag does not respect the "Before Link", "Between Link and Description", and "After Link" settings defined for Link Categories in the WordPress:Links Manager, Formatting (but respect Category Options, Show, Description). To get around this feature/limitation, see Example 2 from wp_get_links().

:这个标签 respect "链接之前","链接和描述之间",和"链接之后"设置,这些设置是为链接管理器中的链接类别定义的,格式(但是这个标签respect类别选项,显示,描述)。要避开这个feature/局限性,请看看wp_get_links()中的例 2

Replace With

取代

wp_list_bookmarks().

wp_list_bookmarks().

Usage

用法

%%% <?php get_links_list('order'); ?> %%%

%%% <?php get_links_list('order'); ?> %%%

Example

例子

Display links sorted by Link Category ID. 显示根据链接类别ID分类的链接。

<?php get_links_list('id'); ?> 
<?php get_links_list('id'); ?> 

Automatically generates the <li> with an ID of the Link Category wrapped in an <h2> heading. It looks like this (links edited for space):

自动产生<li>链接 类别的ID,在<h2>标题的下面,看起来就像(为空格编辑的链接):

<li id="linkcat-1"><h2>Blogroll</h2>
   <ul>
      <li><a href="http://example1.com/">Blogroll Link 1</a></li>
      <li><a href="http://example2.com/">Blogroll Link 2</a></li>
      <li><a href="http://example3.com/">Blogroll Link 3</a></li>
    </ul>
</li>


<li id="linkcat-1"><h2>Blogroll</h2>
   <ul>
      <li><a href="http://example1.com/">Blogroll Link 1</a></li>
      <li><a href="http://example2.com/">Blogroll Link 2</a></li>
      <li><a href="http://example3.com/">Blogroll Link 3</a></li>
    </ul>
</li>

Parameters

参数

order
(string) Value to sort Link Categories by. Valid values:

;顺序:(string)给链接类别分类的参数值。有效的参数值:

  • 'name' (Default)
  • '名称' (默认)
  • 'id'
  • 'id'
Prefixing the above options with an underscore (ex: '_id') sorts links in reverse order.
用一个下划线作为上述选项的前缀(例如: '_id') 用相反的顺序给链接分类。

Related

模板:Tag Link Manager Tags

模板:PHP Function Tag Footer

相关的

模板:标签链接管理器链接

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