comment_form_logged_in
Filters the 'logged in' message for the comment form for display.
Использование
add_filter( 'comment_form_logged_in', 'wp_kama_comment_form_logged_in_filter', 10, 3 ); /** * Function for `comment_form_logged_in` filter-hook. * * @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. * * @return string */ function wp_kama_comment_form_logged_in_filter( $args_logged_in, $commenter, $user_identity ){ // filter... return $args_logged_in; }
- $args_logged_in(строка)
- The HTML for the 'logged in as [user]' message, the Edit profile link, and the Log out link.
- $commenter(массив)
- An array containing the comment author's username, email, and URL.
- $user_identity(строка)
- If the commenter is a registered user, the display name, blank otherwise.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
comment_form_logged_in
wp-includes/comment-template.php 2753
echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );