comment_author_IP()
Displays the IP address of the author of the current comment.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
comment_author_IP( $comment_id );
- $comment_id(int|WP_Comment)
- WP_Comment or the ID of the comment for which to print the author's IP address.
По умолчанию: current comment
Список изменений
С версии 0.71 | Введена. |
С версии 4.4.0 | Added the ability for $comment_id to also accept a WP_Comment object. |
Код comment_author_IP() comment author IP WP 6.5.2
function comment_author_IP( $comment_id = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid echo esc_html( get_comment_author_IP( $comment_id ) ); }