How to get comments with mixed status using get_comments?

As of the WordPress codex there is no such option. But you could just combine two or more comment arrays using plain PHP:

array_merge(
    get_comments( array( 'status' => 'hold' ) ),
    get_comments( array( 'status' => 'trash' ) )
);

http://codex.wordpress.org/Function_Reference/get_comments

http://php.net/array_merge

Leave a Comment