WP::set_query_var( string $key, mixed $value )
Sets the value of a query variable.
Parameters
- $key
-
(string) (Required) Query variable name.
- $value
-
(mixed) (Required) Query variable value.
Source
File: wp-includes/class-wp.php
public function set_query_var( $key, $value ) { $this->query_vars[ $key ] = $value; }
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp/set_query_var