WordPress.org

Make WordPress Core

Ticket #7966: 7966.diff

File 7966.diff, 1.3 KB (added by ryan, 6 years ago)
  • wp-admin/menu.php

     
    2626$awaiting_mod = $awaiting_mod->moderated; 
    2727 
    2828$menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'wp-menu-open menu-top-single', 'menu-dashboard', 'images/menu/home.png' ); 
    29         $submenu['index.php'][5]  = array( __('Dashboard'), 'read' , 'index.php' ); 
    3029 
    3130$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' ); 
    3231 
     
    5251        $submenu['page-new.php'][15] = array( __('Edit'), 'edit_pages', 'edit-pages.php' ); 
    5352 
    5453$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top-last', 'menu-comments', 'images/menu/comments.png' ); 
    55         $submenu['edit-comments.php'][15] = array( __('Comments'), 'edit_posts', 'edit-comments.php' ); 
    5654 
    5755$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group 
    5856 
     
    172170                if ( ! current_user_can($data[1]) ) { 
    173171                        $_wp_menu_nopriv[$data[2]] = true; 
    174172                        unset($menu[$id]); 
    175                 } elseif ( !empty($data[0]) ) { 
    176                         $submenu[$data[2]][0] = $data; 
    177173                } 
    178174        } 
    179175}