wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_query_var › WordPress Function

Od1.5.0
Przestarzałyn/a
get_query_var ( $query_var, $default_value = '' )
Parametry: (2)
  • (string) $query_var The variable key to retrieve.
    Wymagane: Tak
  • (mixed) $default_value Optional. Value to return if the query variable is not set. Default empty string.
    Wymagane: Nie
    Domyślny: (puste)
Powrót:
  • (mixed) Contents of the query variable.
Zdefiniowane na:
Codex:
Dziennik zmian:
  • 3.9.0

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



Źródło

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