WP::add_query_var() public WP 2.1.0
Adds a query variable to the list of public query variables.
{} It's a method of the class: WP{}
No Hooks.
Return
null
. Null. Nothing.
Usage
global $wp; $wp->add_query_var( $qv );
- $qv(string) (required)
- Query variable name.
Changelog
Since 2.1.0 | Introduced. |
Code of WP::add_query_var() WP::add query var WP 5.7
public function add_query_var( $qv ) {
if ( ! in_array( $qv, $this->public_query_vars, true ) ) {
$this->public_query_vars[] = $qv;
}
}