# feed_links()

URL: https://chugunov.pro/api-wordpress/functions/feed_links/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.8.0.

## Сигнатура

```php
feed_links( array $args = array() )
```

## Описание

Выводит ссылки на основные ленты (feeds).

## Параметры

- `$args` `array` — необязательный, по умолчанию `array()`. Необязательные аргументы.

## Исходный код

Файл: `wp-includes/general-template.php:3250`

```php
function feed_links( $args = array() ) {
	if ( ! current_theme_supports( 'automatic-feed-links' ) ) {
		return;
	}

	$defaults = array(
		/* translators: Separator between site name and feed type in feed links. */
		'separator' => _x( '&raquo;', 'feed link' ),
		/* translators: 1: Site title, 2: Separator (raquo). */
		'feedtitle' => __( '%1$s %2$s Feed' ),
		/* translators: 1: Site title, 2: Separator (raquo). */
		'comstitle' => __( '%1$s %2$s Comments Feed' ),
	);

	$args = wp_parse_args( $args, $defaults );

	/**
	 * Filters the feed links arguments.
	 *
	 * @since 6.7.0
	 *
	 * @param array $args An array of feed links arguments.
	 */
	$args = apply_filters( 'feed_links_args', $args );

	/**
	 * Filters whether to display the posts feed link.
	 *
	 * @since 4.4.0
	 *
	 * @param bool $show Whether to display the posts feed link. Default true.
	 */
	if ( apply_filters( 'feed_links_show_posts_feed', true ) ) {
		printf(
			'<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
			feed_content_type(),
			esc_attr( sprintf( $args['feedtitle'], get_bloginfo( 'name' ), $args['separator'] ) ),
			esc_url( get_feed_link() )
		);
	}

	/**
	 * Filters whether to display the comments feed link.
	 *
	 * @since 4.4.0
	 *
	 * @param bool $show Whether to display the comments feed link. Default true.
	 */
	if ( apply_filters( 'feed_links_show_comments_feed', true ) ) {
		printf(
			'<link rel="alternate" type="%s" title="%s" href="%s" />' . "\n",
			feed_content_type(),
			esc_attr( sprintf( $args['comstitle'], get_bloginfo( 'name' ), $args['separator'] ) ),
			esc_url( get_feed_link( 'comments_' . get_default_feed() ) )
		);
	}
}
```

## История изменений

- 2.8.0 — Introduced.

## Связанные

Использует: [`get_feed_link`](https://chugunov.pro/api-wordpress/functions/get_feed_link/), [`feed_content_type`](https://chugunov.pro/api-wordpress/functions/feed_content_type/), [`get_default_feed`](https://chugunov.pro/api-wordpress/functions/get_default_feed/), [`current_theme_supports`](https://chugunov.pro/api-wordpress/functions/current_theme_supports/), [`_x`](https://chugunov.pro/api-wordpress/functions/_x/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`esc_attr`](https://chugunov.pro/api-wordpress/functions/esc_attr/), [`esc_url`](https://chugunov.pro/api-wordpress/functions/esc_url/), [`get_bloginfo`](https://chugunov.pro/api-wordpress/functions/get_bloginfo/), [`wp_parse_args`](https://chugunov.pro/api-wordpress/functions/wp_parse_args/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/feed_links/
