Retrieves all of the WordPress supported comment statuses.
Description
Comments have a limited set of valid status values, this provides the comment status values and descriptions.
Source
*
* @param string|array $args Optional. Array or string of arguments. See WP_Comment_Query::__construct()
* for information on accepted arguments. Default empty string.
* @return WP_Comment[]|int[]|int List of comments or number of found comments if `$count` argument is true.
*/
function get_comments( $args = '' ) {
$query = new WP_Comment_Query();
return $query->query( $args );
}
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.