Skip to content

Commit

Permalink
move back to wp_safe_remote_get
Browse files Browse the repository at this point in the history
  • Loading branch information
kadencewp committed Feb 16, 2024
1 parent 2cc0b38 commit bee4fbe
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions includes/class-kadence-blocks-prebuilt-library-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@ public function get_pattern_content( WP_REST_Request $request ) {
}
// Get the response.
$api_url = add_query_arg( $args, $library_url );
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 20,
Expand Down Expand Up @@ -1788,7 +1788,7 @@ public function get_remote_library_contents( $library, $library_url, $key ) {
}
// Get the response.
$api_url = add_query_arg( $args, $library_url );
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 30,
Expand Down Expand Up @@ -1835,7 +1835,7 @@ public function get_remote_library_categories( $library, $library_url, $key ) {
}
// Get the response.
$api_url = add_query_arg( $args, $library_url );
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 30,
Expand Down Expand Up @@ -1985,7 +1985,7 @@ public function get_remote_remaining_credits() {
$args['email'] = $this->api_email;
}
$api_url = add_query_arg( $args, $this->remote_credits_url . 'get-remaining' );
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 20,
Expand Down Expand Up @@ -2013,7 +2013,7 @@ public function get_remote_remaining_credits() {
*/
public function get_remote_image_collections() {
$api_url = $this->remote_ai_url . 'images/collections';
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 20,
Expand Down Expand Up @@ -2122,7 +2122,7 @@ public function get_keyword_suggestions( WP_REST_Request $request ) {
*/
public function get_remote_industry_verticals() {
$api_url = $this->remote_ai_url . 'verticals';
$response = wp_remote_get(
$response = wp_safe_remote_get(
$api_url,
array(
'timeout' => 20,
Expand Down Expand Up @@ -2283,7 +2283,7 @@ public function import_image( $image_data ) {
return $local_image['image'];
}
$file_content = wp_remote_retrieve_body(
wp_remote_get(
wp_safe_remote_get(
$image_data['url'],
array(
'timeout' => '60',
Expand Down

0 comments on commit bee4fbe

Please sign in to comment.