Make WordPress Core

Changeset 33103


Ignore:
Timestamp:
07/07/2015 09:56:19 AM (9 years ago)
Author:
dd32
Message:

Ensure that Custom Links in menu's are marked as current regardless of their scheme.
Props McGuive7, marsjaninzmarsa.
Fixes #32221

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r33035 r33103  
    563563            $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_root_relative_current );
    564564            $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url;
    565             $item_url = untrailingslashit( $raw_item_url );
     565            $item_url = set_url_scheme( untrailingslashit( $raw_item_url ) );
    566566            $_indexless_current = untrailingslashit( preg_replace( '/' . preg_quote( $wp_rewrite->index, '/' ) . '$/', '', $current_url ) );
    567567
Note: See TracChangeset for help on using the changeset viewer.