Used By
Used By | Description |
---|---|
wp-includes/Requests/Transport/fsockopen.php: Requests_Transport_fsockopen::request() | Perform a request |
Format a URL given GET data
(array) (Required)
(array|object) (Required) Data to build query using, see https://secure.php.net/http_build_query
(string) URL with data
File: wp-includes/Requests/Transport/fsockopen.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; }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_transport_fsockopen/format_get