
WordPress REST API入门基础知识点
apply_filters( 'get_comments_number', $count, $post_id )
get_comments_number: 这个函数检索给定文章的评论数。该函数只接受一个参数,即文章的ID,并返回一个代表评论数量的整数。
过滤一个文章的返回评论数。
return apply_filters( 'get_comments_number', $count, $post_id );