wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



build_query › WordPress Function

Seit2.3.0
Veraltetn/v
build_query ( $data )
Parameter:
  • (array) $data Array of key/value pairs to build the query from.
    Erforderlich: Ja
Links:
Siehe:
Gibt zurück:
  • (string) Query string, without URL encoding applied.
Definiert in:
Codex:

Builds a URL query based on an associative or indexed array.

This is a convenient function for easily building URL queries. It sets the separator to '&' and uses the _http_build_query() function. Unlike PHP's native http_build_query(), this function does NOT URL-encode the keys or values. Callers are responsible for encoding values beforehand with urlencode() or rawurlencode(), or late-escaping the output with esc_url() before use.


Quellcode

function build_query( $data ) {
	return _http_build_query( $data, null, '&', '', false );
}