Changeset 35382 for trunk/src/wp-admin/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-admin/includes/nav-menu.php
r35170 r35382 494 494 } 495 495 496 $post_type = get_post_type_object( $post_type_name ); 497 $archive_link = get_post_type_archive_link( $post_type_name ); 498 if ( $post_type->has_archive ) { 499 $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1; 500 array_unshift( $posts, (object) array( 501 'ID' => 0, 502 'object_id' => $_nav_menu_placeholder, 503 'object' => $post_type_name, 504 'post_content' => '', 505 'post_excerpt' => '', 506 'post_title' => $post_type->labels->archives, 507 'post_type' => 'nav_menu_item', 508 'type' => 'post_type_archive', 509 'url' => get_post_type_archive_link( $post_type_name ), 510 ) ); 511 } 512 496 513 /** 497 514 * Filter the posts displayed in the 'View All' tab of the current
Note: See TracChangeset
for help on using the changeset viewer.