WordPress at a glance
function is not described

Requests_Transport_cURL::format_get() protected WP 1.0

Format a URL given GET data

{} It's a method of the class: Requests_Transport_cURL{}

No Hooks.

Return

String. URL with data

Usage

$result = Requests_Transport_cURL::format_get( $url, $data );
$url(string) (required)
$data(array/object) (required)
Data to build query using, see http_build_query

Code of Requests_Transport_cURL::format_get() WP 5.5.1

<?php
protected static function format_get($url, $data) {
	if (!empty($data)) {
		$url_parts = parse_url($url);
		if (empty($url_parts['query'])) {
			$query = $url_parts['query'] = '';
		}
		else {
			$query = $url_parts['query'];
		}

		$query .= '&' . http_build_query($data, null, '&');
		$query = trim($query, '&');

		if (empty($url_parts['query'])) {
			$url .= '?' . $query;
		}
		else {
			$url = str_replace($url_parts['query'], $query, $url);
		}
	}
	return $url;
}