diff --git a/wp-includes/http.php b/wp-includes/http.php index cb45212d2..3d623fe48 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -1121,6 +1121,9 @@ class WP_Http_ExtHTTP { case 'HEAD': $r['method'] = HTTP_METH_HEAD; break; + case 'PUT': + $r['method'] = HTTP_METH_PUT; + break; case 'GET': default: $r['method'] = HTTP_METH_GET; @@ -1306,6 +1309,10 @@ class WP_Http_Curl { curl_setopt( $handle, CURLOPT_POST, true ); curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); break; + case 'PUT': + curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' ); + curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] ); + break; } if ( true === $r['blocking'] )