# comments_link()

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

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

## Сигнатура

```php
comments_link( string $deprecated = '', string $deprecated_2 = '' )
```

## Описание

Выводит ссылку на комментарии к текущей записи.

## Параметры

- `$deprecated` `string` — необязательный, по умолчанию `''`. Не используется.
- `$deprecated_2` `string` — необязательный, по умолчанию `''`. Не используется.

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

Файл: `wp-includes/comment-template.php:896`

```php
function comments_link( $deprecated = '', $deprecated_2 = '' ) {
	if ( ! empty( $deprecated ) ) {
		_deprecated_argument( __FUNCTION__, '0.72' );
	}
	if ( ! empty( $deprecated_2 ) ) {
		_deprecated_argument( __FUNCTION__, '1.3.0' );
	}
	echo esc_url( get_comments_link() );
}
```

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

- 0.71 — Introduced.

## Связанные

Использует: [`get_comments_link`](https://chugunov.pro/api-wordpress/functions/get_comments_link/), [`esc_url`](https://chugunov.pro/api-wordpress/functions/esc_url/), [`_deprecated_argument`](https://chugunov.pro/api-wordpress/functions/_deprecated_argument/).
Используется в: [`print_embed_comments_button`](https://chugunov.pro/api-wordpress/functions/print_embed_comments_button/).

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