Make WordPress Core

Ticket #32112: 32112.3.diff

File 32112.3.diff, 729 bytes (added by boonebgorges, 9 years ago)
  • src/wp-includes/post.php

    diff --git src/wp-includes/post.php src/wp-includes/post.php
    index 7b65753..aadda42 100644
    function wp_get_attachment_url( $post_id = 0 ) { 
    49924992                $url = get_the_guid( $post->ID );
    49934993        }
    49944994
    4995         /*
    4996          * If currently on SSL, prefer HTTPS URLs when we know they're supported by the domain
    4997          * (which is to say, when they share the domain name of the current SSL page).
    4998          */
    4999         if ( is_ssl() && 'https' !== substr( $url, 0, 5 ) && parse_url( $url, PHP_URL_HOST ) === $_SERVER['HTTP_HOST'] ) {
    5000                 $url = set_url_scheme( $url, 'https' );
     4995        if ( is_ssl() && ! is_admin() && 'wp-login.php' !== $GLOBALS['pagenow'] ) {
     4996                $url = set_url_scheme( $url );
    50014997        }
    50024998
    50034999        /**