- Timestamp:
- 10/28/2016 02:56:16 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
r38928 r38991 603 603 } 604 604 605 // Ensure nav menu item URL is set according to linked object. 606 if ( ! empty( $post->object_id ) ) { 607 if ( 'post_type' === $post->type ) { 608 $post->url = get_permalink( $post->object_id ); 609 } elseif ( 'post_type_archive' === $post->type && ! empty( $post->object ) ) { 610 $post->url = get_post_type_archive_link( $post->object ); 611 } elseif ( 'taxonomy' == $post->type && ! empty( $post->object ) ) { 612 $post->url = get_term_link( (int) $post->object, $post->object ); 613 } 614 } 615 605 616 /** This filter is documented in wp-includes/nav-menu.php */ 606 617 $post->attr_title = apply_filters( 'nav_menu_attr_title', $post->attr_title );
Note: See TracChangeset
for help on using the changeset viewer.