mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-18 14:21:25 +01:00
Query: Add a WP::remove_query_var()
helper function.
This makes cleaning up public query vars easier. Fixes #35234. Built from https://develop.svn.wordpress.org/trunk@36177 git-svn-id: http://core.svn.wordpress.org/trunk@36144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9d7fb9b28
commit
85bb9aa5fb
@ -95,6 +95,17 @@ class WP {
|
|||||||
$this->public_query_vars[] = $qv;
|
$this->public_query_vars[] = $qv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove name from list of public query variables.
|
||||||
|
*
|
||||||
|
* @since 4.5.0
|
||||||
|
*
|
||||||
|
* @param string $name Query variable name.
|
||||||
|
*/
|
||||||
|
public function remove_query_var( $name ) {
|
||||||
|
$this->public_query_vars = array_diff( $this->public_query_vars, array( $name ) );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of a query variable.
|
* Set the value of a query variable.
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36176';
|
$wp_version = '4.5-alpha-36177';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user