Make WordPress Core


Ignore:
Timestamp:
10/24/2015 05:45:11 PM (9 years ago)
Author:
wonderboymusic
Message:

Nav Menus: show custom post type Archive item at the top of the View All tab for the post type on the legacy Nav Menu screen.

Props aaroncampbell, DrewAPicture, seanchayes, hlashbrooke, paulwilde, ericlewis, raulillana
See #16075.

File:
1 edited

Legend:

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

    r34666 r35382  
    579579            $active_object = $menu_item->object;
    580580
     581        // if the menu item corresponds to the currently-queried post type archive
     582        } elseif (
     583            'post_type_archive' == $menu_item->type &&
     584            is_post_type_archive( array( $menu_item->object ) )
     585        ) {
     586            $classes[] = 'current-menu-item';
     587            $menu_items[$key]->current = true;
    581588        // if the menu item corresponds to the currently-requested URL
    582589        } elseif ( 'custom' == $menu_item->object && isset( $_SERVER['HTTP_HOST'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.