Changeset 35382 for trunk/src/wp-includes/nav-menu.php
- Timestamp:
- 10/24/2015 05:45:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/nav-menu.php
r34769 r35382 404 404 $original_parent = (int) $original_object->post_parent; 405 405 $original_title = $original_object->post_title; 406 } elseif ( 'post_type_archive' == $args['menu-item-type'] ) { 407 $original_object = get_post_type_object( $args['menu-item-object'] ); 408 $original_title = $original_object->labels->archives; 406 409 } 407 410 … … 732 735 $menu_item->title = '' == $menu_item->post_title ? $original_title : $menu_item->post_title; 733 736 737 } elseif ( 'post_type_archive' == $menu_item->type ) { 738 $object = get_post_type_object( $menu_item->object ); 739 if ( $object ) { 740 $menu_item->title = '' == $menu_item->post_title ? $object->labels->archives : $menu_item->post_title; 741 } else { 742 $menu_item->_invalid = true; 743 } 744 745 $menu_item->type_label = __( 'Post Type Archive' ); 746 $menu_item->description = ''; 747 $menu_item->url = get_post_type_archive_link( $menu_item->object ); 734 748 } elseif ( 'taxonomy' == $menu_item->type ) { 735 749 $object = get_taxonomy( $menu_item->object );
Note: See TracChangeset
for help on using the changeset viewer.