WP::set_query_var()
Sets the value of a query variable.
Method of the class: WP{}
No Hooks.
Return
null
. Nothing (null).
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. |
WP::set_query_var() WP::set query var code WP 6.6.2
public function set_query_var( $key, $value ) { $this->query_vars[ $key ] = $value; }