Ticket #24975: 24975.2.patch
File 24975.2.patch, 1.7 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/nav-menu.php
628 628 'post_type' => $post_type_name, 629 629 'suppress_filters' => true, 630 630 'update_post_term_cache' => false, 631 'update_post_meta_cache' => false 632 ); 633 631 'update_post_meta_cache' => false, 632 ); 633 634 634 if ( isset( $post_type['args']->_default_query ) ) 635 635 $args = array_merge($args, (array) $post_type['args']->_default_query ); 636 636 … … 642 642 return; 643 643 } 644 644 645 foreach ( $posts as $post ) { 646 if ( 'future' == $post->post_status ) { 647 648 $post->label .= $post->post_title . " " . __( '(Scheduled)' ); 649 650 } 651 } 652 645 653 $num_pages = $get_posts->max_num_pages; 646 654 647 655 $page_links = paginate_links( array( … … 712 720 <?php 713 721 $recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => 15 ) ); 714 722 $most_recent = $get_posts->query( $recent_args ); 723 724 foreach ( $most_recent as $most_recent_post ) { 725 if ( 'future' == $most_recent_post->post_status ) { 726 727 $most_recent_post->label .= $most_recent_post->post_title . " " . __( '(Scheduled)' ); 728 729 } 730 } 731 715 732 $args['walker'] = $walker; 716 733 echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args ); 717 734 ?> … … 1117 1134 if ( 'page' == $object->name ) { 1118 1135 $object->_default_query = array( 1119 1136 'orderby' => 'menu_order title', 1120 'post_status' => 'publish',1137 'post_status' => array( 'publish', 'future' ), 1121 1138 ); 1122 1139 1123 1140 // Posts should show only published items.