Make WordPress Core


Ignore:
Timestamp:
08/30/2012 01:33:00 PM (12 years ago)
Author:
ryan
Message:

Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/theme.php

    r21629 r21664  
    892892        $url = get_random_header_image();
    893893
    894     if ( is_ssl() )
    895         $url = str_replace( 'http://', 'https://', $url );
    896     else
    897         $url = str_replace( 'https://', 'http://', $url );
    898 
    899     return esc_url_raw( $url );
     894    return esc_url_raw( set_url_scheme( $url ) );
    900895}
    901896
Note: See TracChangeset for help on using the changeset viewer.