wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php:1269Checks comment_approved to set comment status for single comment output.
$comment_approvedstringstring protected function prepare_status_response( $comment_approved ) { switch ( $comment_approved ) { case 'hold': case '0': $status = 'hold'; break; case 'approve': case '1': $status = 'approved'; break; case 'spam': case 'trash': default: $status = $comment_approved; break; } return $status; }Introduced in 4.7.0. One change between 6.7.7 and 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
$comment_approved retyped from string|int to string.verified against sourcesrc/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.