Changeset 35500 for trunk/src/wp-includes/class-wp-customize-nav-menus.php
- Timestamp:
- 11/04/2015 04:29:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r34487 r35500 110 110 if ( ! get_post_type_object( $object ) ) { 111 111 return new WP_Error( 'nav_menus_invalid_post_type' ); 112 } else { 113 $post_type = get_post_type_object( $object ); 112 114 } 113 115 … … 121 123 'object' => '', 122 124 'url' => home_url(), 125 ); 126 } elseif ( 'post' !== $object && 0 === $page && $post_type->has_archive ) { 127 // Add a post type archive link. 128 $items[] = array( 129 'id' => $object . '-archive', 130 'title' => $post_type->labels->archives, 131 'type' => 'post_type_archive', 132 'type_label' => __( 'Post Type Archive' ), 133 'object' => $object, 134 'url' => get_post_type_archive_link( $object ), 123 135 ); 124 136 }
Note: See TracChangeset
for help on using the changeset viewer.