Make WordPress Core

Ticket #42550: 0001-make-wp_upload_dir-respect-SSL.patch

File 0001-make-wp_upload_dir-respect-SSL.patch, 640 bytes (added by Senning, 7 years ago)

Run set_url_scheme on URLs in _wp_upload_dir

  • wp-includes/functions.php

    From 936aae30bc0eafc669eec2e724576c9743e617e4 Mon Sep 17 00:00:00 2001
    From: Senning Luk <senning@puppydogtales.ca>
    Date: Tue, 14 Nov 2017 15:15:48 -0500
    Subject: [PATCH] make wp_upload_dir respect SSL
    
    ---
     wp-includes/functions.php | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/wp-includes/functions.php b/wp-includes/functions.php
    index b5d21285b6..d56c88e273 100644
    a b function _wp_upload_dir( $time = null ) { 
    19961996                }
    19971997        }
    19981998
     1999        //Use HTTPS URLs on secure pages
     2000        $url = set_url_scheme( $url );
     2001
    19992002        $basedir = $dir;
    20002003        $baseurl = $url;
    20012004