wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_query_var › WordPress Function

Depuis1.5.0
Dépréciéen/a
get_query_var ( $query_var, $default_value = '' )
Paramètres: (2)
  • (string) $query_var The variable key to retrieve.
    Requis: Oui
  • (mixed) $default_value Optional. Value to return if the query variable is not set. Default empty string.
    Requis: Non
    Défaut: (vide)
Retourne:
  • (mixed) Contents of the query variable.
Défini(e) dans:
Codex:
Changelog:
  • 3.9.0

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



Source

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