protected function handle_status_param( $new_status, $comment ) {
		$old_status = wp_get_comment_status( $comment->comment_ID );

		if ( $new_status === $old_status ) {
			return false;
		}

		switch ( $new_status ) {
			case 'approved' :
			case 'approve':
			case '1':
				$changed = wp_set_comment_status( $comment->comment_ID, 'approve' );
				break;
			case 'hold':
			case '0':
				$changed = wp_set_comment_status( $comment->comment_ID, 'hold' );
				break;
			case 'spam' :
				$changed = wp_spam_comment( $comment->comment_ID );
				break;
			case 'unspam' :
				$changed = wp_unspam_comment( $comment->comment_ID );
				break;
			case 'trash' :
				$changed = wp_trash_comment( $comment->comment_ID );
				break;
			case 'untrash' :
				$changed = wp_untrash_comment( $comment->comment_ID );
				break;
			default :
				$changed = false;
				break;
		}

		return $changed;
	}
protected function handle_status_param( $new_status, $comment ) {
		$old_status = wp_get_comment_status( $comment->comment_ID );

		if ( $new_status === $old_status ) {
			return false;
		}

		switch ( $new_status ) {
			case 'approved' :
			case 'approve':
			case '1':
				$changed = wp_set_comment_status( $comment->comment_ID, 'approve' );
				break;
			case 'hold':
			case '0':
				$changed = wp_set_comment_status( $comment->comment_ID, 'hold' );
				break;
			case 'spam' :
				$changed = wp_spam_comment( $comment->comment_ID );
				break;
			case 'unspam' :
				$changed = wp_unspam_comment( $comment->comment_ID );
				break;
			case 'trash' :
				$changed = wp_trash_comment( $comment->comment_ID );
				break;
			case 'untrash' :
				$changed = wp_untrash_comment( $comment->comment_ID );
				break;
			default :
				$changed = false;
				break;
		}

		return $changed;
	}
protected function handle_status_param ( $ new_status , $ comment ) { $ old_status = wp_get_comment_status ( $ comment -> comment_ID ) ; if ( $ new_status === $ old_status ) { return false ; } switch ( $ new_status ) { case 'approved' : case 'approve' : case '1' : $ changed = wp_set_comment_status ( $ comment -> comment_ID , 'approve' ) ; break ; case 'hold' : case '0' : $ changed = wp_set_comment_status ( $ comment -> comment_ID , 'hold' ) ; break ; case 'spam' : $ changed = wp_spam_comment ( $ comment -> comment_ID ) ; break ; case 'unspam' : $ changed = wp_unspam_comment ( $ comment -> comment_ID ) ; break ; case 'trash' : $ changed = wp_trash_comment ( $ comment -> comment_ID ) ; break ; case 'untrash' : $ changed = wp_untrash_comment ( $ comment -> comment_ID ) ; break ; default : $ changed = false ; break ; } return $ changed ; }
Set the comment_status of a given comment object when creating or updating a comment.

@param string|int $new_status
@param object     $comment
@return boolean   $changed
Set the comment_status of a given comment object when creating or updating a comment .