Uses
Uses | Description |
---|---|
wp-includes/Requests/IRI.php: Requests_IRI::absolutize() | Create a new IRI object by resolving a relative IRI |
Merge a request’s data with the default data
(array) (Required) Request data (same form as request_multiple)
(boolean) (Optional) Should we merge options as well?
Default value: true
(array) Request data
File: wp-includes/Requests/Session.php
protected function merge_request($request, $merge_options = true) { if ($this->url !== null) { $request['url'] = Requests_IRI::absolutize($this->url, $request['url']); $request['url'] = $request['url']->uri; } if (empty($request['headers'])) { $request['headers'] = array(); } $request['headers'] = array_merge($this->headers, $request['headers']); if (empty($request['data'])) { if (is_array($this->data)) { $request['data'] = $this->data; } } elseif (is_array($request['data']) && is_array($this->data)) { $request['data'] = array_merge($this->data, $request['data']); } if ($merge_options !== false) { $request['options'] = array_merge($this->options, $request['options']); // Disallow forcing the type, as that's a per request setting unset($request['options']['type']); } return $request; }
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/requests_session/merge_request