WordPress.org

Make WordPress Core

Ticket #16822: 16822.diff

File 16822.diff, 1.4 KB (added by willnorris, 9 months ago)
  • wp-includes/link-template.php

    diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php
    index 7197549..9e60b0c 100644
    a b function get_home_url( $blog_id = null, $path = '', $scheme = null ) { 
    19131913        } 
    19141914 
    19151915        if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { 
    1916                 if ( is_ssl() && ! is_admin() ) 
     1916                if ( is_ssl() && ! is_admin() && ! is_login() ) 
    19171917                        $scheme = 'https'; 
    19181918                else 
    19191919                        $scheme = parse_url( $url, PHP_URL_SCHEME ); 
  • wp-includes/load.php

    diff --git a/wp-includes/load.php b/wp-includes/load.php
    index e1eb15e..366764c 100644
    a b function wp_clone( $object ) { 
    572572} 
    573573 
    574574/** 
     575 * Whether the current request is for the login page. 
     576 * 
     577 * @since 3.7 
     578 * 
     579 * @return bool True if inside WordPress login pages. 
     580 */ 
     581function is_login() { 
     582        if ( defined( 'WP_LOGIN' ) ) 
     583                return WP_LOGIN; 
     584 
     585        return false; 
     586} 
     587 
     588/** 
    575589 * Whether the current request is for a network or blog admin page 
    576590 * 
    577591 * Does not inform on whether the user is an admin! Use capability checks to 
  • wp-login.php

    diff --git a/wp-login.php b/wp-login.php
    index 532ffd9..91d97e8 100644
    a b  
    88 * @package WordPress 
    99 */ 
    1010 
     11if ( !defined('WP_LOGIN') ) 
     12        define('WP_LOGIN', true); 
     13 
    1114/** Make sure that the WordPress bootstrap has run before continuing. */ 
    1215require( dirname(__FILE__) . '/wp-load.php' ); 
    1316