wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_query_var › WordPress Function

Da1.5.0
Deprecaton/a
get_query_var ( $query_var, $default_value = '' )
Parametri: (2)
  • (string) $query_var The variable key to retrieve.
    Richiesto:
  • (mixed) $default_value Optional. Value to return if the query variable is not set. Default empty string.
    Richiesto: No
    Default: (vuoto)
Ritorna:
  • (mixed) Contents of the query variable.
Definito a:
Codex:
ChangeLog:
  • 3.9.0

Retrieves the value of a query variable in the WP_Query class.



Sorgenti

function get_query_var( $query_var, $default_value = '' ) {
	global $wp_query;
	return $wp_query->get( $query_var, $default_value );
}