WordPress at Your Fingertips
function is not described

WP_Query::set() public WP 1.5.0

Sets the value of a query variable.

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

No Hooks.

Return

null. Nothing.

Usage

global $wp_query;
$wp_query->set( $query_var, $value );
$query_var(string) (required)
Query variable key.
$value(mixed) (required)
Query variable value.

Code of WP_Query::set() WP 5.8.3

public function set( $query_var, $value ) {
	$this->query_vars[ $query_var ] = $value;
}