Created
November 17, 2016 00:06
-
-
Save andrewklau/78dddf113947767adb475ca4ad31aea6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: S3 Endpoint Uploads | |
Plugin URI: https://www.newiteration.com/ | |
Description: Add S3_UPLOADS_ENDPOINT_URL to S3-Uploads | |
Version: 1.0.0 | |
Author: New Iteration | |
Author URI: https://www.newiteration.com/ | |
License: MIT License | |
*/ | |
add_filter('s3_uploads_s3_client_params', 's3_uploads_s3_client_params'); | |
function s3_uploads_s3_client_params($params) | |
{ | |
if (env('S3_UPLOADS_ENDPOINT_URL')) { | |
$params['endpoint'] = env('S3_UPLOADS_ENDPOINT_URL'); | |
} | |
return $params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment