get_category_feed_link() WP 2.5.0
Retrieves the feed link for a category.
Returns a link to the feed for all posts in a given category. A specific feed can be requested or left blank to get the default feed.
Хуков нет.
Возвращает
Строку. Link to the feed for the category specified by $cat_id.
Использование
get_category_feed_link( $cat_id, $feed );
- $cat_id(число) (обязательный)
- Category ID.
- $feed(строка)
- Feed type. Possible values include 'rss2', 'atom'.
По умолчанию: value of get_default_feed()
Список изменений
С версии 2.5.0 | Введена. |
Код get_category_feed_link() get category feed link WP 5.6.2
function get_category_feed_link( $cat_id, $feed = '' ) {
return get_term_feed_link( $cat_id, 'category', $feed );
}