'.esc_html( $update_msg ).'
';
}
if ( get_option( 'wpdb_dest_bb_s3_bucket_key' ) && get_option( 'wpdb_dest_bb_s3_bucket_secret' ) ) {
try {
// Check for CURL.
if ( ! extension_loaded( 'curl' ) && ! @dl( 'so' === PHP_SHLIB_SUFFIX ? 'curl.so' : 'php_curl.dll' ) ) { // phpcs:ignore
echo esc_html__("ERROR: CURL extension not loaded\n\n", 'wpdbbkp');
}
$b2_authorize_url = "https://api.backblazeb2.com/b2api/v2/b2_authorize_account";
$credentials = base64_encode($wpdb_dest_bb_s3_bucket_key . ":" . $wpdb_dest_bb_s3_bucket_secret);
// Authorize account
$response = wp_remote_get($b2_authorize_url, array(
'headers' => array(
'Authorization' => 'Basic ' . $credentials
),
'timeout' => 60 // Extend timeout
));
if(!is_wp_error($response)){
$body = wp_remote_retrieve_body($response);
$data = json_decode($body);
}
if(is_wp_error($response) || empty($data->authorizationToken)){
echo '