WordPress.org

Make WordPress Core

Ticket #18360: forcessl-password-reset.18360.diff

File forcessl-password-reset.18360.diff, 664 bytes (added by robmiller, 2 years ago)
  • wp-includes/link-template.php

    diff --git wp-includes/link-template.php wp-includes/link-template.php
    index de76f45..a81ef7a 100644
    function network_home_url( $path = '', $scheme = null ) { 
    21392139 
    21402140        $orig_scheme = $scheme; 
    21412141 
     2142        $is_login = !empty($GLOBALS['pagenow']) && in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php')); 
     2143 
    21422144        if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) 
    2143                 $scheme = is_ssl() && ! is_admin() ? 'https' : 'http'; 
     2145                $scheme = is_ssl() && ! is_admin() && ! $is_login ? 'https' : 'http'; 
    21442146 
    21452147        if ( 'relative' == $scheme ) 
    21462148                $url = $current_site->path;