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
This commit is contained in:
Dion Hulse 2015-07-07 09:57:26 +00:00
parent 9e7a2f930e
commit ffb1de37ae
2 changed files with 2 additions and 2 deletions

View File

@ -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 ) ) ) {

View File

@ -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.