WordPress函数文档comment_text()
获取一个评论的内容 描述 Displays the text of a comment. Use get_co…
获取一个评论的内容
描述
Displays the text of a comment. Use get_comment_text() to return a value instead of displaying it.
用法
<?php comment_text( $comment_ID ); ?>
参数
comment_ID
(integer) (可选) The ID of the comment for which to print the text.
默认值: 0 (the current comment)
源文件
comment_text() 函数的代码位于 wp-includes/comment-template.php
.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* ———————————-
* wordpress函数 kim收集
* ———————————- */
/**
* Display the text of the current comment.
*
* @since 0.71
*
* @see Walker_Comment::comment()
*
* @param int $comment_ID ID of the comment for which to print the text. Default 0.
* @param array $args Optional. An array of arguments. Default empty array. Default empty.
*/
function comment_text( $comment_ID = 0, $args = array() ) {
$comment = get_comment( $comment_ID );
$comment_text = get_comment_text( $comment_ID , $args );
/**
* Filter the text of a comment to be displayed.
*
* @since 1.2.0
*
* @see Walker_Comment::comment()
*
* @param string $comment_text Text of the current comment.
* @param object $comment The comment object.
* @param array $args An array of arguments.
*/
echo apply_filters( ‘comment_text’, $comment_text, $comment, $args );
}
|
相关
Comments Function(函数)s
- Function(函数): cancel_comment_reply_link()
- Function(函数): comment_author()
- Function(函数): comment_author_email()
- Function(函数): comment_author_email_link()
- Function(函数): comment_author_IP()
- Function(函数): comment_author_link()
- Function(函数): comment_author_rss()
- Function(函数): comment_author_url()
- Function(函数): comment_author_url_link()
- Function(函数): comment_class()
- Function(函数): comment_date()
- Function(函数): comment_excerpt()
- Function(函数): comment_form_title()
- Function(函数): comment_form(),
- Function(函数): comment_ID()
- Function(函数): comment_id_fields()
- Function(函数): comment_reply_link()
- Function(函数): comment_text()
- Function(函数): comment_text_rss()
- Function(函数): comment_time()
- Function(函数): comment_type()
- Function(函数): comments_link
- Function(函数): comments_number()
- Function(函数): comments_open(),
- Function(函数): comments_popup_link()
- Function(函数): comments_popup_script()
- Function(函数): comments_rss_link()
- Function(函数): get_avatar()
- Function(函数): next_comments_link()
- Function(函数): paginate_comments_links()
- Function(函数): permalink_comments_rss()
- Function(函数): previous_comments_link()
- Function(函数): wp_list_comments()
- 原文:http://codex.wordpress.org/Function_Reference/comment_text
类别:WordPress函数文档、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
评论功能已经关闭!