private static function get_core_checksums( $version, $locale ) {
		$query = http_build_query( compact( 'version', 'locale' ), null, '&' );
		$url   = "https://api.wordpress.org/core/checksums/1.0/?{$query}";

		$options = [ 'timeout' => 30 ];
		$headers = [ 'Accept' => 'application/json' ];

		$response = Utils\http_request( 'GET', $url, null, $headers, $options );

		if ( ! $response->success || 200 !== (int) $response->status_code ) {
			return "Checksum request '{$url}' failed (HTTP {$response->status_code}).";
		}

		$body = trim( $response->body );
		$body = json_decode( $body, true );

		if ( ! is_array( $body )
			|| ! isset( $body['checksums'] )
			|| ! is_array( $body['checksums'] ) ) {
			return "Checksums not available for WordPress {$version}/{$locale}.";
		}

		return $body['checksums'];
	}
private static function get_core_checksums( $version, $locale ) {
		$query = http_build_query( compact( 'version', 'locale' ), null, '&' );
		$url   = "https://api.wordpress.org/core/checksums/1.0/?{$query}";

		$options = [ 'timeout' => 30 ];
		$headers = [ 'Accept' => 'application/json' ];

		$response = Utils\http_request( 'GET', $url, null, $headers, $options );

		if ( ! $response->success || 200 !== (int) $response->status_code ) {
			return "Checksum request '{$url}' failed (HTTP {$response->status_code}).";
		}

		$body = trim( $response->body );
		$body = json_decode( $body, true );

		if ( ! is_array( $body )
			|| ! isset( $body['checksums'] )
			|| ! is_array( $body['checksums'] ) ) {
			return "Checksums not available for WordPress {$version}/{$locale}.";
		}

		return $body['checksums'];
	}
private static function get_core_checksums ( $ version , $ locale ) { $ query = http_build_query ( compact ( 'version' , 'locale' ) , null , '&' ) ; $ url = "https://api.wordpress.org/core/checksums/1.0/?{$query}" ; $ options = [ 'timeout' => 30 ] ; $ headers = [ 'Accept' => 'application/json' ] ; $ response = Utils \ http_request ( 'GET' , $ url , null , $ headers , $ options ) ; if ( ! $ response -> success || 200 !== ( int ) $ response -> status_code ) { return "Checksum request '{$url}' failed (HTTP {$response->status_code})." ; } $ body = trim ( $ response -> body ) ; $ body = json_decode ( $ body , true ) ; if ( ! is_array ( $ body ) || ! isset ( $ body [ 'checksums' ] ) || ! is_array ( $ body [ 'checksums' ] ) ) { return "Checksums not available for WordPress {$version}/{$locale}." ; } return $ body [ 'checksums' ] ; }
Security copy of the core function with Requests - Gets the checksums for the given version of WordPress.

@param string $version Version string to query.
@param string $locale  Locale to query.
@return string|array String message on failure. An array of checksums on success.
Security copy of the core function with Requests - Gets the checksums for the given version of WordPress .