get_comment_statuses(): string[]

In this article

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.

Return

string[] List of comment status labels keyed by status.

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

VersionDescription
2.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.