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