/** * Returns a signed Amazon S3 download URL. * * @param $bucket string Bucket name * @param $file_name string File name (URI) * @return string The signed download URL */ public static function get_s3_url($bucket, $file_name) { $s3_url = ''; $options = get_option('wp-license-manager-settings'); if (Wp_License_Manager_S3::use_official_api()) { write_log('Using official API '); $s3_url = Wp_License_Manager_S3_Official::get_s3_url($options['aws_key'], $options['aws_secret'], $bucket, $file_name); } else { write_log('Using fallback API '); $s3_url = Wp_License_Manager_S3_Fallback::get_s3_url($options['aws_key'], $options['aws_secret'], $bucket, $file_name); } return $s3_url; }