get_comment_statuses(): string[]

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.


Top ↑

Return

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


Top ↑

Source

File: wp-includes/comment.php. View all references

function get_comment_statuses() {
	$status = array(
		'hold'    => __( 'Unapproved' ),
		'approve' => _x( 'Approved', 'comment status' ),
		'spam'    => _x( 'Spam', 'comment status' ),
		'trash'   => _x( 'Trash', 'comment status' ),
	);

	return $status;
}


Top ↑

Changelog

Changelog
Version Description
2.7.0 Introduced.

Top ↑

User Contributed Notes

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