apply_filters( 'wp_get_current_commenter', array $comment_author_data )
- Since
- 3.1.0
Filters the current commenter's name, email, and URL.
Compatibility
- WordPress
- since 3.1.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$comment_author_dataarray- { An array of current commenter variables.
@type string $comment_author The name of the current commenter, or an empty string.
@type string $comment_author_email The email address of the current commenter, or an empty string.
@type string $comment_author_url The URL address of the current commenter, or an empty string.
}$comment_authorstringThe name of the current commenter, or an empty string.$comment_author_emailstringThe email address of the current commenter, or an empty string.$comment_author_urlstringThe URL address of the current commenter, or an empty string.
Where this hook fires · 1
wp-includes/comment.php:1938wp_get_current_commenter()
Source code
* * @type string $comment_author The name of the current commenter, or an empty string. * @type string $comment_author_email The email address of the current commenter, or an empty string. * @type string $comment_author_url The URL address of the current commenter, or an empty string. * } */ return apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' ) );} /** * Gets unapproved comment author's email. * * Used to allow the commenter to see their pending comment.Changelog
Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.