Remove links from the menu separators, see #17324
git-svn-id: http://svn.automattic.com/wordpress/trunk@17943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e46b1da6f4
commit
46c545cdba
|
@ -82,9 +82,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
|||
|
||||
echo "\n\t<li$class$id>";
|
||||
|
||||
if ( false !== strpos($class, 'wp-menu-separator') ) {
|
||||
echo '<a class="separator" href="?unfoldmenu=1"><br /></a>';
|
||||
} elseif ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
|
||||
if ( $submenu_as_parent && !empty($submenu[$item[2]]) ) {
|
||||
$submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index.
|
||||
$menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]);
|
||||
$menu_file = $submenu[$item[2]][0][2];
|
||||
|
@ -96,7 +94,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
|
|||
} else {
|
||||
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>";
|
||||
}
|
||||
} else if ( current_user_can($item[1]) ) {
|
||||
} else if ( !empty($item[2]) && current_user_can($item[1]) ) {
|
||||
$menu_hook = get_plugin_page_hook($item[2], 'admin.php');
|
||||
$menu_file = $item[2];
|
||||
if ( false !== $pos = strpos($menu_file, '?') )
|
||||
|
|
|
@ -69,7 +69,7 @@ if ( ! is_multisite() ) {
|
|||
|
||||
unset($theme_update_count, $wordpress_update_count, $update_themes, $update_plugins, $update_wordpress);
|
||||
|
||||
$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
|
||||
$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
|
||||
|
||||
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top menu-icon-post', 'menu-posts', 'div' );
|
||||
$submenu['edit.php'][5] = array( __('All Posts'), 'edit_posts', 'edit.php' );
|
||||
|
@ -152,7 +152,7 @@ foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false,
|
|||
}
|
||||
unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax);
|
||||
|
||||
$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
|
||||
$menu[59] = array( '', 'read', '', '', 'wp-menu-separator' );
|
||||
|
||||
if ( current_user_can( 'switch_themes') ) {
|
||||
$menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' );
|
||||
|
@ -232,7 +232,7 @@ $menu[80] = array( __('Settings'), 'manage_options', 'options-general.php', '',
|
|||
|
||||
$_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group
|
||||
|
||||
$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
|
||||
$menu[99] = array( '', 'read', '', '', 'wp-menu-separator-last' );
|
||||
|
||||
// Back-compat for old top-levels
|
||||
$_wp_real_parent_file['post.php'] = 'edit.php';
|
||||
|
|
Loading…
Reference in New Issue