WordPress.org

Make WordPress Core

Ticket #25449: add-https-wp_upload_dir.patch

File add-https-wp_upload_dir.patch, 438 bytes (added by ryanhellyer, 6 years ago)

Adds https support to wp_upload_dir()

  • wp-includes/functions.php

     
    16221622        }
    16231623
    16241624        $basedir = $dir;
    1625         $baseurl = $url;
     1625        if ( is_ssl() )
     1626                $baseurl = str_replace( 'http://', 'https://', $url );
     1627        else
     1628                $baseurl = $url;
    16261629
    16271630        $subdir = '';
    16281631        if ( get_option( 'uploads_use_yearmonth_folders' ) ) {