WordPress at a glance
function is not described

WP_Tax_Query::sanitize_relation() public WP 4.1.0

Sanitize a 'relation' operator.

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

No Hooks.

Return

String. Sanitized relation ('AND' or 'OR').

Usage

$WP_Tax_Query = new WP_Tax_Query();
$WP_Tax_Query->sanitize_relation( $relation );
$relation(string) (required)
Raw relation key from the query argument.

Changelog

Since 4.1.0 Introduced.

Code of WP_Tax_Query::sanitize_relation() WP 5.7

<?php
public function sanitize_relation( $relation ) {
	if ( 'OR' === strtoupper( $relation ) ) {
		return 'OR';
	} else {
		return 'AND';
	}
}