WordPress.org

Make WordPress Core

Ticket #17629: 17629.diff

File 17629.diff, 1.1 KB (added by ryan, 7 years ago)
  • wp-admin/includes/menu.php

     
    214214        unset($menu_order, $default_menu_order);
    215215}
    216216
     217// Remove the last menu item if it is a separator.
     218$last_menu_item = end( $menu );
     219if ( 'wp-menu-separator' == $last_menu_item[ 4 ] )
     220        array_pop( $menu );
     221reset( $menu );
     222unset( $last_menu_item );
     223
    217224if ( !user_can_access_admin_page() ) {
    218225        do_action('admin_page_access_denied');
    219226        wp_die( __('You do not have sufficient permissions to access this page.') );
  • wp-admin/menu.php

     
    234234
    235235$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
    236236
    237 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
     237$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator' );
    238238
    239239// Back-compat for old top-levels
    240240$_wp_real_parent_file['post.php'] = 'edit.php';