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