diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index 1771fb0f8a..fdfc3f5eb0 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -135,6 +135,8 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { echo "
  • {$item[0]}
  • "; $first = true; + + // 0 = menu_title, 1 = capability, 2 = menu_slug, 3 = classes foreach ( $submenu_items as $sub_key => $sub_item ) { if ( ! current_user_can( $sub_item[1] ) ) continue; @@ -165,6 +167,10 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { $class[] = 'current'; } + if ( ! empty( $sub_item[3] ) ) { + $class[] = $sub_item[3]; + } + $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; $menu_hook = get_plugin_page_hook($sub_item[2], $item[2]);