pre_comment_user_ip хук-фильтрWP 1.5.0

Filters the comment author's IP address before it is set.

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

add_filter( 'pre_comment_user_ip', 'wp_kama_pre_comment_user_ip_filter' );

/**
 * Function for `pre_comment_user_ip` filter-hook.
 * 
 * @param string $comment_author_ip The comment author's IP address.
 *
 * @return string
 */
function wp_kama_pre_comment_user_ip_filter( $comment_author_ip ){

	// filter...
	return $comment_author_ip;
}
$comment_author_ip(строка)
The comment author's IP address.

Список изменений

С версии 1.5.0 Введена.

Где вызывается хук

wp_filter_comment()
pre_comment_user_ip
wp-includes/comment.php 2132
$commentdata['comment_author_IP'] = apply_filters( 'pre_comment_user_ip', $commentdata['comment_author_IP'] );

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

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