- Timestamp:
- 11/27/2016 03:04:35 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
r39345 r39365 605 605 606 606 // Ensure nav menu item URL is set according to linked object. 607 if ( ! empty( $post->object_id ) ) { 608 if ( 'post_type' === $post->type ) { 609 $post->url = get_permalink( $post->object_id ); 610 } elseif ( 'post_type_archive' === $post->type && ! empty( $post->object ) ) { 611 $post->url = get_post_type_archive_link( $post->object ); 612 } elseif ( 'taxonomy' == $post->type && ! empty( $post->object ) ) { 613 $post->url = get_term_link( (int) $post->object, $post->object ); 614 } 607 if ( 'post_type' === $post->type && ! empty( $post->object_id ) ) { 608 $post->url = get_permalink( $post->object_id ); 609 } elseif ( 'taxonomy' === $post->type && ! empty( $post->object ) && ! empty( $post->object_id ) ) { 610 $post->url = get_term_link( (int) $post->object_id, $post->object ); 611 } elseif ( 'post_type_archive' === $post->type && ! empty( $post->object ) ) { 612 $post->url = get_post_type_archive_link( $post->object ); 613 } 614 if ( is_wp_error( $post->url ) ) { 615 $post->url = ''; 615 616 } 616 617
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)