WordPress:Template Tags/get bookmarks

来自站长百科
跳转至: 导航、​ 搜索

Description[ ]

描述[ ]

This function will be found in WordPress v2.1, it is NOT supported by WordPress v2.0. get_bookmarks() returns an array of bookmarks found in the Administration > Blogroll > Manage Blogroll panel. This Template Tag allows the user to retrieve the bookmark information directly.

这个函数可以在WordPress2.1版本中找到,WordPress2.0不支持这个函数。get_bookmarks()返回了一组bookmarks,这组bookmarks是从显示管理 > 友情链接 > 管理友情链接面板中找到的。这个[WordPress:Template_Tags|模板标签]]能够使用户直接得到bookmark信息。

Usage[ ]

用法[ ]

%%% <?php get_bookmarks('arguments'); ?> %%%

%%% <?php get_bookmarks('arguments'); ?> %%%

Examples[ ]

Default Usage[ ]

例子[ ]

默认用法[ ]

'orderby' => 'name', 
'order' => 'ASC',
'limit' => -1, 
'category' => '',
'category_name' => '', 
'hide_invisible' => 1,
'show_updated' => 0, 
'include' => '',
'exclude' => ''


'orderby' => 'name', 
'order' => 'ASC',
'limit' => -1, 
'category' => '',
'category_name' => '', 
'hide_invisible' => 1,
'show_updated' => 0, 
'include' => '',
'exclude' => ''

By default, the usage gets: 默认情况下,用法得到:

  • All bookmarks ordered by name, ascending
  • 所有的bookmarks根据名称,按升序排列
  • Bookmarks marked as hidden are not returned.
  • 标记为隐藏的Bookmarks不会返回。
  • The link_updated_f field (the update time in the form of a timestamp) is not returned.
  • The link_updated_f field(以时间戳形式出现的更新时间)不会返回。

Parameters[ ]

参数[ ]

orderby
(string) Value to sort bookmarks on. Defaults to 'name' unless you pass the value of '' (empty), in which case it sets to 'id'. Valid options:


orderby
(string)给bookmark分类的参数。默认为'名称',除非你验证通过了参数'' (空的),在这种情况下,设置为'id'。有效的选项:


  • 'id'
  • 'url'
  • 'name'
  • 'target'
  • 'description'
  • 'owner' - User who added bookmark through bookmarks Manager.
  • 'rating'
  • 'updated'
  • 'rel' - bookmark relationship (XFN).
  • 'notes'
  • 'rss'
  • 'length' - The length of the bookmark name, shortest to longest.
  • 'rand' - Display bookmarks in random order.


  • 'id'
  • 'url'
  • '名称'
  • '目标'
  • '描述'
  • '用户' - 通过bookmarks管理器添加bookmark的用户
  • '等级级别'
  • '更新的'
  • 'rel' - bookmark关系 (XFN).
  • '注意'
  • 'rss'
  • '长度' - bookmark名称的长度,从最短到最长。
  • 'rand' -以任意的顺序显示bookmarks。


order
(string) Sort order, ascending or descending for the orderby parameter. Valid values:


;顺序:(string)分类顺序,根据参数的升序或者降序。有效的参数值:


  • ASC (Default)
  • DESC


  • ASC (默认)
  • DESC


limit
(integer) Maximum number of bookmarks to display. Defaults to -1 (all bookmarks).

;限制:(整数)最多显示的bookmarks的数目。默认为-1(所有的bookmarks)。


category
(string) Comma separated list of bookmark category ID's.
类别
(string)用逗号分开列表上bookmark类别的ID。
category_name
(string) Category name of a catgeory of bookmarks to retrieve. Overrides category parameter.
category_name
(string)需要返回的bookmark的类别名称。撤除了类别参数。
hide_invisible
(boolean) TRUE causes only bookmarks with link_visible set to 'Y' to be retrieved.
hide_invisible
(boolean)正确的,导致拥有link_visible设置为'Y'的bookmarks返回。
  • 1 (True - default)
  • 0 (False)


  • 1 (正确的 – 默认)
  • 0 (错误的)
show_updated
(boolean) TRUE causes an extra column called "link_category_f" to be inserted into the results, which contains the same value as "link_updated", but in a unix timestamp format. Handy for using PHP date functions on this data.
show_updated
(boolean')TRUE导致了一个额外的,称为"link_category_f"的栏,插入了结果中,结果包含了与"link_updated"相同的值,但是是以unix时间戳的格式。在这个数据上使用PHP日期函数非常方便。
  • 1 (True)
  • 0 (False - default)
  • 1 (正确的)
  • 0 (错误的 – 默认)
include
(string) Comma separated list of numeric bookmark IDs to include in the output. For example, 'include=1,3,6' means to return or echo bookmark IDs 1, 3, and 6. If the include string is used, the category, category_name, and exclude parameters are ignored. Defaults to (all Bookmarks).
包含
(string)用逗号分开列表上的bookmark的ID数字,并且将其包含在输出中。例如,, '包含=1,3,6'指的是返回或者echo bookmark ID1,3,和6。如果使用了包含字符串,便忽视了类别, category_name, 和 删除参数。默认为(所有的Bookmarks)。
exclude
(string) Comma separated list of numeric bookmark IDs to exclude. For example, 'exclude=4,12' means that bookmark IDs 4 and 12 will NOT be returned or echoed. Defaults to (exclude nothing).
删除
(string)删除列表上用逗号分开的bookmark ID 数字。例如,'删除=4,12'指的是bookmark ID 为4和12的bookmark不会返回或者echod。默认为(不删除任何内容)。

Related[ ]

模板:Tag bookmark Manager Tags

模板:PHP Function Tag Footer


相关的[ ]

模板:标签bookmark管理器标签