build_query()WP 2.3.0

Builds URL query based on an associative and, or indexed array.

This is a convenient function for easily building url queries. It sets the separator to '&' and uses _http_build_query() function.

Хуков нет.

Возвращает

Строку. URL-encoded string.

Использование

build_query( $data );
$data(массив) (обязательный)
URL-encode key/value pairs.

Заметки

Список изменений

С версии 2.3.0 Введена.

Код build_query() WP 6.5.2

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