Uses
Uses | Description |
---|---|
wp-includes/class-wp-comment-query.php: WP_Comment_Query::__construct() | Constructor. |
Retrieve a list of comments.
The comment list can be for the blog as a whole or for an individual post.
(string|array) (Optional) Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments.
Default value: ''
(int|array) List of comments or number of found comments if $count
argument is true.
File: wp-includes/comment.php
function get_comments( $args = '' ) { $query = new WP_Comment_Query; return $query->query( $args ); }
Version | Description |
---|---|
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_comments