WordPress at a glance
function is not described

WP::set_query_var() public WP 2.3.0

Sets the value of a query variable.

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

No Hooks.

Return

null. Null. Nothing.

Usage

global $wp;
$wp->set_query_var( $key, $value );
$key(string) (required)
Query variable name.
$value(mixed) (required)
Query variable value.

Changelog

Since 2.3.0 Introduced.

Code of WP::set_query_var() WP 5.7.1

<?php
public function set_query_var( $key, $value ) {
	$this->query_vars[ $key ] = $value;
}