首页 WordPress函数大全 get_approved_comments()

get_approved_comments()

2020-05-01 / 3348阅 / 悠然

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

get_approved_comments( int $post_id, array $args = array() )

Retrieve the approved comments for post $post_id.

描述

参数

$post_id

(int)
(Required)
The ID of the post.

$args

(array)
(Optional)
See WP_Comment_Query::__construct() for information>Default value: array()

返回

(int|array) $comments The approved comments, or number of comments if $count argument is true.

大家谈论
    我的见解