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

---

# apply_filters( ‘comment_form_logged_in’, string $args_logged_in, array $commenter, string $user_identity )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/comment_form_logged_in/?output_format=md#changelog)

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

Filters the ‘logged in’ message for the comment form for display.

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

 `$args_logged_in`string

The HTML for the ‘logged in as [user]’ message, the Edit profile link, and the Log
out link.

`$commenter`array

An array containing the comment author’s username, email, and URL.

`$user_identity`string

If the commenter is a registered user, the display name, blank otherwise.

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

    ```php
    echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
    ```

[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#L2757)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/comment-template.php#L2757-L2757)

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

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

Outputs a complete commenting form for use within a template.

  |

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

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

## User Contributed Notes

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