get_comments
get_comments ( $args = '' )
Parameters:- (string|array) args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty string.
Returns:- (WP_Comment[]|int[]|int) List of comments or number of found comments if `$count` argument is true.
Defined at: - Introduced in WordPress: 2.7.0
- Deprecated in WordPress: —
Description
Retrieves a list of comments.The comment list can be for the blog as a whole or for an individual post.