comment_form_logged_in хук-фильтрWP 3.0.0

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 logged-in-as HTML-formatted message.
 * @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 logged-in-as HTML-formatted message.
$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()
comment_form_logged_in
wp-includes/comment-template.php 2593
echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );

Где используется хук в WordPress

Использование не найдено.