# get_comment_author_IP

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

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

## Сигнатура

```php
apply_filters( 'get_comment_author_IP', string $comment_author_ip, string $comment_id, WP_Comment $comment )
```

## Описание

Фильтрует возвращаемый IP-адрес автора комментария.

## Параметры

- `$comment_author_ip` `string` — обязательный. IP-адрес автора комментария или пустая строка, если он недоступен.
- `$comment_id` `string` — обязательный. ID комментария в виде числовой строки.
- `$comment` `WP_Comment` — обязательный. Объект комментария.

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

IP-адрес автора комментария или пустая строка, если он недоступен.

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

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

```php
return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
```

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

- 4.1.0 — The $comment_id and $comment parameters were added.
- 1.5.0 — Introduced.

## Связанные

Используется в: [`get_comment_author_IP`](https://chugunov.pro/api-wordpress/functions/get_comment_author_ip/).

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