Ticket #20759: 20759.4.diff
File 20759.4.diff, 921 bytes (added by , 12 years ago) |
---|
-
wp-includes/link-template.php
1892 1892 function get_home_url( $blog_id = null, $path = '', $scheme = null ) { 1893 1893 $orig_scheme = $scheme; 1894 1894 1895 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) )1896 $scheme = is_ssl() && !is_admin() ? 'https' : 'http';1897 1898 1895 if ( empty( $blog_id ) || !is_multisite() ) { 1899 1896 $url = get_option( 'home' ); 1900 1897 } else { … … 1903 1900 restore_current_blog(); 1904 1901 } 1905 1902 1903 if ( ! in_array( $scheme, array( 'http', 'https', 'relative' ) ) ) { 1904 if ( is_ssl() && ! is_admin() ) 1905 $scheme = 'https'; 1906 else 1907 $scheme = parse_url( $url, PHP_URL_SCHEME ); 1908 } 1909 1906 1910 $url = set_url_scheme( $url, $scheme ); 1907 1911 1908 1912 if ( ! empty( $path ) && is_string( $path ) && strpos( $path, '..' ) === false )