WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/30/2012 01:33:00 PM (9 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/nav-menu-template.php

    r21559 r21664  
    359359        } elseif ( 'custom' == $menu_item->object ) {
    360360            $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] );
    361             $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current;
     361            $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_root_relative_current );
    362362            $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url;
    363363            $item_url = untrailingslashit( $raw_item_url );
Note: See TracChangeset for help on using the changeset viewer.