From ffb1de37ae9492f15ffdf0779ebf2379fa430388 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 7 Jul 2015 09:57:26 +0000 Subject: [PATCH] Ensure that Custom Links in menu's are marked as current regardless of their scheme. Props McGuive7, marsjaninzmarsa. Fixes #32221 Built from https://develop.svn.wordpress.org/trunk@33103 git-svn-id: http://core.svn.wordpress.org/trunk@33074 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/nav-menu-template.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index 3a4192c762..80c0454e2a 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -562,7 +562,7 @@ function _wp_menu_item_classes_by_context( &$menu_items ) { $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] ); $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_root_relative_current ); $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url; - $item_url = untrailingslashit( $raw_item_url ); + $item_url = set_url_scheme( untrailingslashit( $raw_item_url ) ); $_indexless_current = untrailingslashit( preg_replace( '/' . preg_quote( $wp_rewrite->index, '/' ) . '$/', '', $current_url ) ); if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index d1f076c01d..5eee1d187b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-beta1-33102'; +$wp_version = '4.3-beta1-33103'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.