wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_query_var › WordPress Function

Desde1.5.0
Obsoleton/a
get_query_var ( $query_var, $default_value = '' )
Parâmetros: (2)
  • (string) $query_var The variable key to retrieve.
    Required: Yes
  • (mixed) $default_value Optional. Value to return if the query variable is not set. Default empty string.
    Required: No
    Padrão: (empty)
Retorna:
  • (mixed) Contents of the query variable.
Definido em:
Codex:
Log de mudanças:
  • 3.9.0

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



Fonte

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