首页 WordPress函数大全 get_comment()

get_comment()

2020-05-01 / 4313阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_comment( WP_Comment|string|int $comment = null, string $output = OBJECT )

Retrieves comment data given a comment ID or comment object.

描述

If an object is passed then the comment data will be cached and then returned after being passed through a filter. If the comment is empty, then the global comment variable will be used, if it is set.

参数

$comment

(WP_Comment|string|int)
(Optional)
Comment to retrieve.

Default value: null

$output

(string)
(Optional)
The required return type.>WP_Comment object, an associative array, or a numeric array, respectively.

Default value: OBJECT

返回

(WP_Comment|array|null) Depends on $output value.

大家谈论
    我的见解