wp_get_current_commenter WordPress Filter Hook

The wp_get_current_commenter hook is used to get the current commenter's information. This hook is used when a user is not logged in and the comment form is displayed. The hook can be used to get the user's name, email, and website URL.

apply_filters( 'wp_get_current_commenter', array $comment_author_data ) #

Filters the current commenter’s name, email, and URL.


Parameters

$comment_author_data

(array)An array of current commenter variables.

  • 'comment_author'
    (string) The name of the current commenter, or an empty string.
  • 'comment_author_email'
    (string) The email address of the current commenter, or an empty string.
  • 'comment_author_url'
    (string) The URL address of the current commenter, or an empty string.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More