private static function get_core_checksums($version, $locale)
{
$url = 'https://api.wordpress.org/core/checksums/1.0/?' . http_build_query(compact('version', 'locale'), null, '&');
$options = array('timeout' => 30);
$headers = array('Accept' => 'application/json');
$response = Utils\http_request('GET', $url, null, $headers, $options);
if (!$response->success || 200 != $response->status_code) {
return false;
}
$body = trim($response->body);
$body = json_decode($body, true);
if (!is_array($body) || !isset($body['checksums']) || !is_array($body['checksums'])) {
return false;
}
return $body['checksums'];
}