# comment_text

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

Тип: хук-фильтр.
Появился в версии: 1.2.0.

## Сигнатура

```php
apply_filters( 'comment_text', string $comment_text, WP_Comment|null $comment, array $args )
```

## Описание

[See also](#see-also)
- [Walker_Comment::comment()](https://developer.wordpress.org/reference/classes/Walker_Comment/comment/)

## Параметры

- `$comment_text` `string` — обязательный. Текст комментария.
- `$comment` `WP_Comment|null` — обязательный. Объект комментария. Null, если не найден.
- `$args` `array` — обязательный. Массив аргументов.

## Фильтруемое значение

Текст комментария.

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

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

```php
echo apply_filters( 'comment_text', $comment_text, $comment, $args );
```

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

- 1.2.0 — Introduced.

## Связанные

Используется в: `WP_REST_Comments_Controller::prepare_item_for_response`, [`comment_text`](https://chugunov.pro/api-wordpress/functions/comment_text/), [`check_comment`](https://chugunov.pro/api-wordpress/functions/check_comment/).

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