Administration: Remove useless arrow icon from WordPress admin menu.

This changeset deletes the arrow that is typically added next to WordPress admin menu items that have submenus. The `.wp-menu-arrow` element is no longer visible since the WP 3.8 redesign, but the HTML and CSS remained. With this changeset, the HTML generating the arrow is removed, and the corresponding CSS styling is deleted.

Props helen, azaozz, jbkkd, pbearne, flixos90.
Fixes #26960.



Built from https://develop.svn.wordpress.org/trunk@59690


git-svn-id: http://core.svn.wordpress.org/trunk@59032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
audrasjb
2025-01-22 22:33:22 +00:00
parent c72b77f1ee
commit b863373e3c
6 changed files with 9 additions and 26 deletions

View File

@@ -181,9 +181,7 @@
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
#adminmenu li.current a.menu-top,
#adminmenu .wp-menu-arrow,
#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,
#adminmenu .wp-menu-arrow div {
#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
background: #2271b1;
color: #fff;
}
@@ -334,12 +332,6 @@ div.wp-menu-image:before {
position: fixed;
}
/* A new arrow */
.wp-menu-arrow {
display: none !important;
}
ul#adminmenu a.wp-has-current-submenu {
position: relative;
}

File diff suppressed because one or more lines are too long

View File

@@ -180,9 +180,7 @@
#adminmenu li.wp-has-current-submenu a.wp-has-current-submenu,
#adminmenu li.current a.menu-top,
#adminmenu .wp-menu-arrow,
#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head,
#adminmenu .wp-menu-arrow div {
#adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head {
background: #2271b1;
color: #fff;
}
@@ -333,12 +331,6 @@ div.wp-menu-image:before {
position: fixed;
}
/* A new arrow */
.wp-menu-arrow {
display: none !important;
}
ul#adminmenu a.wp-has-current-submenu {
position: relative;
}

File diff suppressed because one or more lines are too long

View File

@@ -142,7 +142,6 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
$img_class = ' dashicons-before ' . sanitize_html_class( $item[6] );
}
}
$arrow = '<div class="wp-menu-arrow"><div></div></div>';
$title = wptexturize( $item[0] );
@@ -171,9 +170,9 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
&& ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) )
) {
$admin_is_parent = true;
echo "<a href='admin.php?page={$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>";
echo "<a href='admin.php?page={$submenu_items[0][2]}'$class $aria_attributes><div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>";
} else {
echo "\n\t<a href='{$submenu_items[0][2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>";
echo "\n\t<a href='{$submenu_items[0][2]}'$class $aria_attributes><div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>$title</div></a>";
}
} elseif ( ! empty( $item[2] ) && current_user_can( $item[1] ) ) {
$menu_hook = get_plugin_page_hook( $item[2], 'admin.php' );
@@ -190,9 +189,9 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
&& ! file_exists( ABSPATH . "/wp-admin/$menu_file" ) )
) {
$admin_is_parent = true;
echo "\n\t<a href='admin.php?page={$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>";
echo "\n\t<a href='admin.php?page={$item[2]}'$class $aria_attributes><div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>";
} else {
echo "\n\t<a href='{$item[2]}'$class $aria_attributes>$arrow<div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>";
echo "\n\t<a href='{$item[2]}'$class $aria_attributes><div class='wp-menu-image$img_class'$img_style aria-hidden='true'>$img</div><div class='wp-menu-name'>{$item[0]}</div></a>";
}
}

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59689';
$wp_version = '6.8-alpha-59690';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.