Ticket #39758: 39758.diff
| File 39758.diff, 905 bytes (added by , 9 years ago) |
|---|
-
src/wp-includes/nav-menu-template.php
396 396 $menu_items[$key]->current = true; 397 397 // if the menu item corresponds to the currently-requested URL 398 398 } elseif ( 'custom' == $menu_item->object && isset( $_SERVER['HTTP_HOST'] ) ) { 399 $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI']);399 $_root_relative_current = strtok( untrailingslashit( $_SERVER['REQUEST_URI'] ), '?' ); 400 400 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_root_relative_current ); 401 401 $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url; 402 402 $item_url = set_url_scheme( untrailingslashit( $raw_item_url ) );