summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2016-04-26 00:51:29 -0400
committerYury German <blueknight@gentoo.org>2016-04-26 00:51:29 -0400
commitda108071d5fb8098d567616db234caacf55a7b51 (patch)
tree7a2dc3a0589b74c57ab0d0c412ce733069307c50 /plugins/jetpack/class.jetpack-client.php
parentUpdate plugin akismet to 3.1.10 (diff)
downloadblogs-gentoo-da108071d5fb8098d567616db234caacf55a7b51.tar.gz
blogs-gentoo-da108071d5fb8098d567616db234caacf55a7b51.tar.bz2
blogs-gentoo-da108071d5fb8098d567616db234caacf55a7b51.zip
Adding jetpack-4.0.2
Diffstat (limited to 'plugins/jetpack/class.jetpack-client.php')
-rw-r--r--plugins/jetpack/class.jetpack-client.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/jetpack/class.jetpack-client.php b/plugins/jetpack/class.jetpack-client.php
index 33dce110..8eafd6cf 100644
--- a/plugins/jetpack/class.jetpack-client.php
+++ b/plugins/jetpack/class.jetpack-client.php
@@ -17,6 +17,7 @@ class Jetpack_Client {
'method' => 'POST',
'timeout' => 10,
'redirection' => 0,
+ 'headers' => array(),
);
$args = wp_parse_args( $args, $defaults );
@@ -106,9 +107,9 @@ class Jetpack_Client {
foreach ( $auth as $key => $value ) {
$header_pieces[] = sprintf( '%s="%s"', $key, $value );
}
- $request['headers'] = array(
+ $request['headers'] = array_merge( $args['headers'], array(
'Authorization' => "X_JETPACK " . join( ' ', $header_pieces ),
- );
+ ) );
// Make sure we keep the host when we do JETPACK__WPCOM_JSON_API_HOST requests.
$host = parse_url( $url, PHP_URL_HOST );