Changeset 19657 for trunk/wp-includes/nav-menu-template.php
- Timestamp:
- 01/03/2012 06:15:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r19593 r19657 363 363 $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] ); 364 364 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current; 365 $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url ); 365 $raw_item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url; 366 $item_url = untrailingslashit( $raw_item_url ); 366 367 $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) ); 367 368 368 if ( in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {369 if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) { 369 370 $classes[] = 'current-menu-item'; 370 371 $menu_items[$key]->current = true;
Note: See TracChangeset
for help on using the changeset viewer.