WordPress at a glance
function is not described

Requests_Transport_fsockopen::format_get() protected WP 1.0

Format a URL given GET data

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

No Hooks.

Return

String. URL with data

Usage

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

Code of Requests_Transport_fsockopen::format_get() WP 5.5.1

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

		$url_parts['query'] .= '&' . http_build_query($data, null, '&');
		$url_parts['query'] = trim($url_parts['query'], '&');
	}
	if (isset($url_parts['path'])) {
		if (isset($url_parts['query'])) {
			$get = $url_parts['path'] . '?' . $url_parts['query'];
		}
		else {
			$get = $url_parts['path'];
		}
	}
	else {
		$get = '/';
	}
	return $get;
}