WordPress.org

Make WordPress Core

Changeset 17943


Ignore:
Timestamp:
05/17/2011 06:19:00 AM (10 years ago)
Author:
azaozz
Message:

Remove links from the menu separators, see #17324

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu-header.php

    r17815 r17943  
    8383        echo "\n\t<li$class$id>";
    8484
    85         if ( false !== strpos($class, 'wp-menu-separator') ) {
    86             echo '<a class="separator" href="?unfoldmenu=1"><br /></a>';
    87         } elseif ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
     85        if ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
    8886            $submenu[$item[2]] = array_values($submenu[$item[2]]);  // Re-index.
    8987            $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
     
    9795                echo "\n\t<div class='wp-menu-image'><a href='{$submenu[$item[2]][0][2]}'>$img</a></div>$arrow$toggle<a href='{$submenu[$item[2]][0][2]}'$class$tabindex>$title</a>";
    9896            }
    99         } else if ( current_user_can($item[1]) ) {
     97        } else if ( !empty($item[2]) && current_user_can($item[1]) ) {
    10098            $menu_hook = get_plugin_page_hook($item[2], 'admin.php');
    10199            $menu_file = $item[2];
  • trunk/wp-admin/menu.php

    r17937 r17943  
    7070unset($theme_update_count, $wordpress_update_count, $update_themes, $update_plugins, $update_wordpress);
    7171
    72 $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
     72$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
    7373
    7474$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'div' );
     
    153153unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax);
    154154
    155 $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
     155$menu[59] = array( '', 'read', '', '', 'wp-menu-separator' );
    156156
    157157if ( current_user_can( 'switch_themes') ) {
     
    233233$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
    234234
    235 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
     235$menu[99] = array( '', 'read', '', '', 'wp-menu-separator-last' );
    236236
    237237// Back-compat for old top-levels
Note: See TracChangeset for help on using the changeset viewer.