comment_author_IP( int|WP_Comment $comment_ID )
Display the IP address of the author of the current comment.
描述
参数
- $comment_ID
-
(int|WP_Comment)
(Optional)
WP_Comment or the ID of the comment for which to print the author’s IP address. Default current comment.
源代码
File: wp-includes/comment-template.php
function comment_author_IP( $comment_ID = 0 ) {
echo esc_html( get_comment_author_IP( $comment_ID ) );
}
更新日志
Version | 描述 |
---|---|
4.4.0 | Added the ability for $comment_ID to also accept a WP_Comment object. |
0.71 | Introduced. |
相关函数
Uses
-
wp-includes/formatting.php:
esc_html() -
wp-includes/comment-template.php:
get_comment_author_IP()
User Contributed Notes
-
Skip to note content
You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note
Contributed by
Codex
Displays comment author IP
Posted from: <?php comment_author_IP(); ?>
你可能对这些文章感兴趣:
- wordpress函数get_all_post_type_supports()用法示例
- wordpress函数get_all_user_settings()用法示例
- wordpress函数get_all_category_ids()用法示例
- wordpress函数get_all_page_ids()用法示例
- wordpress函数get_allowed_mime_types()用法示例
- wordpress函数get_allowed_themes()用法示例
- wordpress函数get_alloptions_110()用法示例
- wordpress函数get_allowed_http_origins()用法示例
- wordpress函数get_alloptions()用法示例
- wordpress函数get_admin_users_for_domain()用法示例
- wordpress函数get_admin_page_title()用法示例
- wordpress函数get_admin_url()用法示例
- wordpress函数get_adjacent_post_rel_link()用法示例
- wordpress函数get_admin_page_parent()用法示例
如有疑问,请前往问答中心反馈!
反馈