get_commentdata() - WordPress 函数参考中文文档

返回介绍

get_commentdata()

发布于 2017-09-10 字数1613 浏览 818 评论 0

Warning: This function has been deprecated. Use get_comment() instead.

get_commentdata( int $comment_ID,  int $no_cache,  bool $include_unapproved = false )

Retrieve an array of comment data about comment $comment_ID.


描述


参数

$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 value: 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 描述
2.7.0 Use get_comment()
0.71 Introduced.

相关函数

Uses

  • wp-includes/functions.php:
    _deprecated_function()
  • wp-includes/comment.php:
    get_comment()

User Contributed Notes

上一篇:get_comment()

下一篇:get_comments()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!