wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php:398Gets the search handler to handle the current request.
$requestWP_REST_RequestWP_REST_Search_Handler|WP_Error protected function get_search_handler( $request ) { $type = $request->get_param( self::PROP_TYPE ); if ( ! $type || ! is_string( $type ) || ! isset( $this->search_handlers[ $type ] ) ) { return new WP_Error( 'rest_search_invalid_type', __( 'Invalid type parameter.' ), array( 'status' => 400 ) ); } return $this->search_handlers[ $type ]; }Introduced in 5.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.