WordPress at a glance
function is not described

WP_REST_Comments_Controller::normalize_query_param() protected WP 4.7.0

Prepends internal property prefix to query parameters to match our response fields.

{} It's a method of the class: WP_REST_Comments_Controller{}

No Hooks.

Return

String. The normalized query parameter.

Usage

// protected - for code of main (parent) or child class
$result = $this->normalize_query_param( $query_param );
$query_param(string) (required)
Query parameter.

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Comments_Controller::normalize_query_param() WP 5.5.1

<?php
protected function normalize_query_param( $query_param ) {
	$prefix = 'comment_';

	switch ( $query_param ) {
		case 'id':
			$normalized = $prefix . 'ID';
			break;
		case 'post':
			$normalized = $prefix . 'post_ID';
			break;
		case 'parent':
			$normalized = $prefix . 'parent';
			break;
		case 'include':
			$normalized = 'comment__in';
			break;
		default:
			$normalized = $prefix . $query_param;
			break;
	}

	return $normalized;
}