wp_get_current_commenter
Filters the current commenter's name, email, and URL.
Использование
add_filter( 'wp_get_current_commenter', 'wp_kama_get_current_commenter_filter' ); /** * Function for `wp_get_current_commenter` filter-hook. * * @param array $comment_author_data An array of current commenter variables. * * @return array */ function wp_kama_get_current_commenter_filter( $comment_author_data ){ // filter... return $comment_author_data; }
- $comment_author_data(массив)
An array of current commenter variables.
-
comment_author(строка)
The name of the current commenter, or an empty string. -
comment_author_email(строка)
The email address of the current commenter, or an empty string. - comment_author_url(строка)
The URL address of the current commenter, or an empty string.
-
Список изменений
С версии 3.1.0 | Введена. |
Где вызывается хук
wp_get_current_commenter
wp-includes/comment.php 1938
return apply_filters( 'wp_get_current_commenter', compact( 'comment_author', 'comment_author_email', 'comment_author_url' ) );