WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/nav-menu-template.php

    r19658 r18746  
    363363            $_root_relative_current = untrailingslashit( $_SERVER['REQUEST_URI'] );
    364364            $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_root_relative_current;
    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 );
     365            $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
    367366            $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
    368367
    369             if ( $raw_item_url && in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
     368            if ( in_array( $item_url, array( $current_url, $_indexless_current, $_root_relative_current ) ) ) {
    370369                $classes[] = 'current-menu-item';
    371370                $menu_items[$key]->current = true;
Note: See TracChangeset for help on using the changeset viewer.