Title: get_comment_text
Published: April 25, 2014
Last modified: February 24, 2026

---

# apply_filters( ‘get_comment_text’, string $comment_text, WP_Comment $comment, array $args )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#wp--skip-link--target)

Filters the text of a comment.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#see-also)󠁿

 * [Walker_Comment::comment()](https://developer.wordpress.org/reference/classes/Walker_Comment/comment/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#parameters)󠁿

 `$comment_text`string

Text of the comment.

`$comment`[WP_Comment](https://developer.wordpress.org/reference/classes/wp_comment/)

The comment object.

`$args`array

An array of arguments.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#source)󠁿

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

[View all references](https://developer.wordpress.org/reference/files/wp-includes/comment-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/comment-template.php#L1059)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L1059-L1059)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#related)󠁿

| Used by | Description | 
| [get_comment_text()](https://developer.wordpress.org/reference/functions/get_comment_text/)`wp-includes/comment-template.php` |

Retrieves the text of the current comment.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_comment_text/?output_format=md#changelog)󠁿

| Version | Description | 
| [1.5.0](https://developer.wordpress.org/reference/since/1.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_comment_text%2F)
before being able to contribute a note or feedback.