Skip to content

Commit

Permalink
Map Block: avoid using sprintf to get the local API URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve committed Jan 23, 2020
1 parent baeb9e4 commit a6d32f0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions extensions/blocks/map/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ function jetpack_get_mapbox_api_key() {
get_current_blog_id()
);
} else {
$endpoint = sprintf(
'%swpcom/v2/service-api-keys/mapbox',
rest_url()
);
$endpoint = rest_url( 'wpcom/v2/service-api-keys/mapbox' );
}

$response = wp_remote_get( esc_url_raw( $endpoint ) );
Expand Down

0 comments on commit a6d32f0

Please sign in to comment.