WordPress.org

Make WordPress Core

Ticket #13525: 13525-dont-show-drafts.patch

File 13525-dont-show-drafts.patch, 762 bytes (added by ocean90, 4 years ago)
  • wp-admin/includes/nav-menu.php

     
    991991 
    992992        // If the menu exists, get its items. 
    993993        if ( is_nav_menu( $menu ) ) { 
    994                 $menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'any') ); 
     994                $menu_items = wp_get_nav_menu_items( $menu->term_id, array('post_status' => 'publish') ); 
    995995                $result = '<div id="menu-instructions" class="post-body-plain'; 
    996996                $result .= ( ! empty($menu_items) ) ? ' menu-instructions-inactive">' : '">'; 
    997997                $result .= __('Select menu items (pages, categories, links) from the boxes at left to begin building your custom menu.');