get_comment_statuses()
Retrieves all of the WordPress supported comment statuses.
Comments have a limited set of valid status values, this provides the comment status values and descriptions.
No Hooks.
Returns
String[]. List of comment status labels keyed by status.
Usage
get_comment_statuses();
Changelog
| Since 2.7.0 | Introduced. |
get_comment_statuses() get comment statuses code WP 7.0
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;
}