函数原型
get_category_feed_link( int|WP_Term|object $cat, string $feed = ” ): string
函数描述
Retrieves the feed link for a category.
是否弃用
未弃用
函数参数
-
$cat
int|WP_Term|object
Required - The ID or category object whose feed link will be retrieved.
-
$feed
string
Optional - Feed type. Possible values include
'rss2','atom'.
Default is the value of get_default_feed() .Default:
''
函数返回值
string Link to the feed for the category specified by $cat.
函数位置
File: wp-includes/link-template.php.
函数源码
function get_category_feed_link( $cat, $feed = '' ) {
return get_term_feed_link( $cat, 'category', $feed );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

