WP::remove_query_var()publicWP 4.5.0

Removes a query variable from a list of public query variables.

Method of the class: WP{}

No Hooks.

Return

null. Nothing (null).

Usage

global $wp;
$wp->remove_query_var( $name );
$name(string) (required)
Query variable name.

Changelog

Since 4.5.0 Introduced.

WP::remove_query_var() code WP 6.4.3

public function remove_query_var( $name ) {
	$this->public_query_vars = array_diff( $this->public_query_vars, array( $name ) );
}