Skip to content

Commit 72ea260

Browse files
committed
Add the safe functions too.
1 parent 4bfb6fb commit 72ea260

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

additionalParams.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
'wp_remote_head' => [$httpReturnType],
88
'wp_remote_post' => [$httpReturnType],
99
'wp_remote_request' => [$httpReturnType],
10+
'wp_safe_remote_get' => [$httpReturnType],
11+
'wp_safe_remote_head' => [$httpReturnType],
12+
'wp_safe_remote_post' => [$httpReturnType],
13+
'wp_safe_remote_request' => [$httpReturnType],
1014
];

wordpress-stubs.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104003,6 +104003,7 @@ function _wp_http_get_object()
104003104003
* @param string $url URL to retrieve.
104004104004
* @param array $args Optional. Request arguments. Default empty array.
104005104005
* @return array|WP_Error The response or WP_Error on failure.
104006+
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104006104007
*/
104007104008
function wp_safe_remote_request($url, $args = array())
104008104009
{
@@ -104021,6 +104022,7 @@ function wp_safe_remote_request($url, $args = array())
104021104022
* @param string $url URL to retrieve.
104022104023
* @param array $args Optional. Request arguments. Default empty array.
104023104024
* @return array|WP_Error The response or WP_Error on failure.
104025+
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104024104026
*/
104025104027
function wp_safe_remote_get($url, $args = array())
104026104028
{
@@ -104039,6 +104041,7 @@ function wp_safe_remote_get($url, $args = array())
104039104041
* @param string $url URL to retrieve.
104040104042
* @param array $args Optional. Request arguments. Default empty array.
104041104043
* @return array|WP_Error The response or WP_Error on failure.
104044+
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104042104045
*/
104043104046
function wp_safe_remote_post($url, $args = array())
104044104047
{
@@ -104057,6 +104060,7 @@ function wp_safe_remote_post($url, $args = array())
104057104060
* @param string $url URL to retrieve.
104058104061
* @param array $args Optional. Request arguments. Default empty array.
104059104062
* @return array|WP_Error The response or WP_Error on failure.
104063+
* @phpstan-return array{headers:Requests_Utility_CaseInsensitiveDictionary,body:string,response:array{code:int,message:string},cookies:array<int,WP_HTTP_Cookie>,filename:string|null,http_response:WP_HTTP_Requests_Response}|WP_Error
104060104064
*/
104061104065
function wp_safe_remote_head($url, $args = array())
104062104066
{

0 commit comments

Comments
 (0)