Changeset 42732 for trunk/src/wp-includes/nav-menu-template.php
- Timestamp:
- 02/24/2018 01:43:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu-template.php
r42343 r42732 442 442 $_root_relative_current = strtok( untrailingslashit( $_SERVER['REQUEST_URI'] ), '?' ); 443 443 } 444 444 445 $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_root_relative_current ); 445 446 $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url; … … 447 448 $_indexless_current = untrailingslashit( preg_replace( '/' . preg_quote( $wp_rewrite->index, '/' ) . '$/', '', $current_url ) ); 448 449 449 if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) { 450 $matches = array( 451 $current_url, urldecode( $current_url ), 452 $_indexless_current, urldecode( $_indexless_current ), 453 $_root_relative_current, urldecode( $_root_relative_current ), 454 ); 455 456 if ( $raw_item_url && in_array( $item_url, $matches ) ) { 450 457 $classes[] = 'current-menu-item'; 451 458 $menu_items[ $key ]->current = true;
Note: See TracChangeset
for help on using the changeset viewer.