Changeset 15584
- Timestamp:
- 09/07/2010 04:17:37 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/nav-menu-template.php
r15545 r15584 360 360 // if the menu item corresponds to the currently-requested URL 361 361 } elseif ( 'custom' == $menu_item->object ) { 362 $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];363 $item_url = strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url;364 $_indexless_current = preg_replace( '/index.php$/', '', $current_url);362 $current_url = untrailingslashit( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ); 363 $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url ); 364 $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) ); 365 365 366 366 if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {
Note: See TracChangeset
for help on using the changeset viewer.