Ticket #37782: 37782.diff
File 37782.diff, 875 bytes (added by , 6 years ago) |
---|
-
src/wp-admin/includes/nav-menu.php
527 527 if ( 'page' == $post_type_name ) { 528 528 $front_page = 'page' == get_option( 'show_on_front' ) ? (int) get_option( 'page_on_front' ) : 0; 529 529 if ( ! empty( $front_page ) ) { 530 /* 531 * Supress $font_page from $posts prior to prepending 532 * This avoids the duplicate entry in the list. 533 */ 534 foreach ( $posts as $key => $post ) { 535 if ( $post->ID == $front_page ) { 536 unset( $posts[$key] ); 537 break; 538 } 539 } 540 530 541 $front_page_obj = get_post( $front_page ); 531 542 $front_page_obj->front_or_home = true; 532 543 array_unshift( $posts, $front_page_obj );