get_comment_statuses

Retrieve all of the WordPress supported comment statuses.

Description

(array) get_comment_statuses(); 

Comments have a limited set of valid status values, this provides the comment status values and descriptions.

Returns (array)

List of comment statuses.


Usage

  1. if ( !function_exists( 'get_comment_statuses' ) ) { 
  2. require_once ABSPATH . WPINC . '/comment.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_comment_statuses(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/comment.php  
  1. function get_comment_statuses() { 
  2. $status = array( 
  3. 'hold' => __( 'Unapproved' ),  
  4. 'approve' => _x( 'Approved', 'comment status' ),  
  5. 'spam' => _x( 'Spam', 'comment status' ),  
  6. 'trash' => _x( 'Trash', 'comment status' ),  
  7. ); 
  8.  
  9. return $status;