Changeset 18746
- Timestamp:
- 09/22/2011 02:25:57 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r17228 r18746 361 361 // if the menu item corresponds to the currently-requested URL 362 362 } elseif ( 'custom' == $menu_item->object ) { 363 $current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 363 $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] ); 364 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current; 364 365 $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url ); 365 366 $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) ); 366 367 367 if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {368 if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) { 368 369 $classes[] = 'current-menu-item'; 369 370 $menu_items[$key]->current = true;
Note: See TracChangeset
for help on using the changeset viewer.