WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2015 05:45:11 PM (5 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-admin/includes/class-walker-nav-menu-edit.php

    r35202 r35382  
    7979            $original_object = get_post( $item->object_id );
    8080            $original_title = get_the_title( $original_object->ID );
     81        } elseif ( 'post_type_archive' == $item->type ) {
     82            $original_object = get_post_type_object( $item->object );
     83            $original_title = $original_object->labels->archives;
    8184        }
    8285
Note: See TracChangeset for help on using the changeset viewer.