WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2010 07:55:28 PM (9 years ago)
Author:
nacin
Message:

Pruning shears.

File:
1 edited

Legend:

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

    r15843 r15904  
    315315
    316316    foreach ( (array) $menu_items as $key => $menu_item ) {
    317    
     317
    318318        $menu_items[$key]->current = false;
    319    
     319
    320320        $classes = (array) $menu_item->classes;
    321321        $classes[] = 'menu-item';
     
    363363            $item_url = untrailingslashit( strpos( $menu_item->url, '#' ) ? substr( $menu_item->url, 0, strpos( $menu_item->url, '#' ) ) : $menu_item->url );
    364364            $_indexless_current = untrailingslashit( preg_replace( '/index.php$/', '', $current_url ) );
    365        
     365
    366366            if ( in_array( $item_url, array( $current_url, $_indexless_current ) ) ) {
    367367                $classes[] = 'current-menu-item';
     
    384384                $active_object = $menu_item->object;
    385385            }
    386        
     386
    387387            if ( untrailingslashit($item_url) == home_url() )
    388388                $classes[] = 'menu-item-home';
     
    404404        $menu_items[$key]->current_item_ancestor = false;
    405405        $menu_items[$key]->current_item_parent = false;
    406    
     406
    407407        if (
    408408            isset( $parent_item->type ) &&
Note: See TracChangeset for help on using the changeset viewer.