wp-includes/class-wp-comment-query.php:1253Parse an 'order' query variable and cast it to ASC or DESC as necessary.
$orderstringstring protected function parse_order( $order ) { if ( ! is_string( $order ) || empty( $order ) ) { return 'DESC'; } if ( 'ASC' === strtoupper( $order ) ) { return 'ASC'; } else { return 'DESC'; } }Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-comment-query.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.