函数原型
get_commentdata( int $comment_ID, int $no_cache, bool $include_unapproved = false ): array
函数描述
Retrieve an array of comment data about comment $comment_ID.
是否弃用
Warning: This function has been deprecated. Use get_comment() instead.
函数参数
-
$comment_ID
int
Required - The ID of the comment
-
$no_cache
int
Required - Whether to use the cache (cast to bool)
-
$include_unapproved
bool
Optional - Whether to include unapproved comments
Default:
false
函数返回值
array The comment data
函数位置
File: wp-includes/deprecated.php.
函数源码
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) {
_deprecated_function( __FUNCTION__, '2.7.0', 'get_comment()' );
return get_comment($comment_ID, ARRAY_A);
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.7.0 | Use get_comment() |
| 0.71 | Introduced. |

