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/link-template.php

    r21662 r21664  
    20502050*/
    20512051function content_url($path = '') {
    2052     $url = WP_CONTENT_URL;
    2053     if ( 0 === strpos($url, 'http') && is_ssl() )
    2054         $url = str_replace( 'http://', 'https://', $url );
     2052    $url = set_url_scheme( WP_CONTENT_URL );
    20552053
    20562054    if ( !empty($path) && is_string($path) && strpos($path, '..') === false )
     
    20842082        $url = WP_PLUGIN_URL;
    20852083
    2086     if ( 0 === strpos($url, 'http') && is_ssl() )
    2087         $url = str_replace( 'http://', 'https://', $url );
     2084   
     2085    $url = set_url_scheme( $url );
    20882086
    20892087    if ( !empty($plugin) && is_string($plugin) ) {
Note: See TracChangeset for help on using the changeset viewer.