WordPress: Function Reference/get category feed link:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
==Description==
== 描述==
== 描述==
Released with [[WordPress:Version 2.5]], this function returns a link to the feed for all posts in the specified category.  A particular feed can be requested, but if the feed parameter is left blank, it returns the 'rss2' feed link.  This function replaces the deprecated '''get_category_rss_link''' function.


这个函数是在[[WordPress:Version 2.5|2.5版本]]时候发行的,为某个类别中的所有文章返回feed的链接。需要一个特别的feed,但是如果feed参数是空白的,返回'rss2' feed链接。这个函数代替了取消的'''get_category_rss_link'''函数。
这个函数是在[[WordPress:Version 2.5|2.5版本]]时候发行的,为某个类别中的所有文章返回feed的链接。需要一个特别的feed,但是如果feed参数是空白的,返回'rss2' feed链接。这个函数代替了取消的'''get_category_rss_link'''函数。
== Usage ==


== 用法 ==
== 用法 ==


%%% <?php get_category_feed_link('cat_id', 'feed'); ?> %%%
%%% <?php get_category_feed_link('cat_id', 'feed'); ?> %%%
%%% <?php get_category_feed_link('cat_id', 'feed'); ?> %%%
== Examples ==


== 例子 ==
== 例子 ==


=== Default Usage ===
=== 默认用法 ===
=== 默认用法 ===
Return the rss2 feed link for post in category 2


返回类别2中的文章的rss2 feed链接。
返回类别2中的文章的rss2 feed链接。
第27行: 第15行:
<pre> <?php get_category_feed_link('2', ''); ?></pre>
<pre> <?php get_category_feed_link('2', ''); ?></pre>


<pre> <?php get_category_feed_link('2', ''); ?></pre>
=== Parameters ===


== 参数 ==
== 参数 ==
; cat_id : (''string'') Category ID of feed link to return. 
; cat_id : (''string'')将要返回的feed链接的类别ID。
; cat_id : (''string'')将要返回的feed链接的类别ID。


; feed : (''string'') Type of feed, if left blank uses, by default, the 'rss2' feed.
; feed : (''string'')feed的类型,如果是空白的,默认情况下,类型是'rss2' feed。
; feed : (''string'')feed的类型,如果是空白的,默认情况下,类型是'rss2' feed。


==Depreciated Function==


==取消的函数==
==取消的函数==


get_category_rss_link
get_category_rss_link
get_category_rss_link

2008年7月26日 (六) 10:32的最新版本

描述[ ]

这个函数是在2.5版本时候发行的,为某个类别中的所有文章返回feed的链接。需要一个特别的feed,但是如果feed参数是空白的,返回'rss2' feed链接。这个函数代替了取消的get_category_rss_link函数。

用法[ ]

%%% <?php get_category_feed_link('cat_id', 'feed'); ?> %%%

例子[ ]

默认用法[ ]

返回类别2中的文章的rss2 feed链接。

 <?php get_category_feed_link('2', ''); ?>


参数[ ]

cat_id
(string)将要返回的feed链接的类别ID。
feed
(string)feed的类型,如果是空白的,默认情况下,类型是'rss2' feed。


取消的函数[ ]

get_category_rss_link