From e43bad431fb889f16f7c3f43593c6e3f859bf0a5 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 6 Jan 2016 22:23:58 +0800 Subject: [PATCH] Fixed upload photo issue with SSL --- core/um-files.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/um-files.php b/core/um-files.php index d0132819..7c3f932c 100644 --- a/core/um-files.php +++ b/core/um-files.php @@ -96,6 +96,10 @@ class UM_Files { $this->upload_basedir = apply_filters('um_upload_basedir_filter', $this->upload_basedir ); $this->upload_baseurl = apply_filters('um_upload_baseurl_filter', $this->upload_baseurl ); + if( is_ssl() ){ + $this->upload_baseurl = str_replace("http://", "https://", $this->upload_baseurl); + } + $this->upload_temp = $this->upload_basedir . 'temp/'; $this->upload_temp_url = $this->upload_baseurl . 'temp/';