comment_form_logged_in
Filter HookDescription
Filters the 'logged in' message for the comment form for display.Hook Information
File Location |
wp-includes/comment-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2759 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$args_logged_in
|
The HTML for the 'logged in as [user]' message, the Edit profile link, and the Log out link. |
array
|
$commenter
|
An array containing the comment author's username, email, and URL. |
string
|
$user_identity
|
If the commenter is a registered user, the display name, blank otherwise. |
Usage Examples
Basic Usage
<?php
// Hook into comment_form_logged_in
add_filter('comment_form_logged_in', 'my_custom_filter', 10, 3);
function my_custom_filter($args_logged_in, $commenter, $user_identity) {
// Your custom filtering logic here
return $args_logged_in;
}
Source Code Context
wp-includes/comment-template.php:2759
- How this hook is used in WordPress core
<?php
2754 * @param array $commenter An array containing the comment author's
2755 * username, email, and URL.
2756 * @param string $user_identity If the commenter is a registered user,
2757 * the display name, blank otherwise.
2758 */
2759 echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
2760
2761 /**
2762 * Fires after the is_user_logged_in() check in the comment form.
2763 *
2764 * @since 3.0.0
PHP Documentation
<?php
/**
* Filters the 'logged in' message for the comment form for display.
*
* @since 3.0.0
*
* @param string $args_logged_in The HTML for the 'logged in as [user]' message,
* the Edit profile link, and the Log out link.
* @param array $commenter An array containing the comment author's
* username, email, and URL.
* @param string $user_identity If the commenter is a registered user,
* the display name, blank otherwise.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/comment-template.php
Related Hooks
Related hooks will be displayed here in future updates.