WPDev.one
Core Function
View Source on Trac ↗

get_comments()

get_comments( mixed $args = '' )

Retrieves a list of comments.

Parameters 1 required

Name / Type Description
mixed

(string | array) $args Optional. Array or string of arguments. See WP_Comment_Query::__construct() for information on accepted arguments. Default empty string.

Required

Return Value

((WP_Comment[])
| int[] | int) List of comments or number of found comments if `$count` argument is true.

Function Information

Since Version
2.7.0
Source File
wp-includes/comment.php
Advertisement