Make WordPress Core

Opened 10 years ago

Last modified 5 years ago

#31049 new defect (bug)

Hiding Administration Menu Items through remove_menu_page function can create unnecessary margin via the menu separator list item

Reported by: monopine's profile monopine Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Plugins Keywords:
Focuses: administration Cc:

Description

In some situations where the Administration Menu has had menu items removed, the wp-menu-separator <li> may appear first. When the menu separator <li> appears first in the menu, unwanted extra margin is created.

This issue occurs when the Dashboard menu item has been disabled, but could occur under other menu reorganizations and configurations.

Attachments (1)

seperator-example.jpg (212.6 KB) - added by monopine 10 years ago.
seperator example

Download all attachments as: .zip

Change History (5)

#1 @monopine
10 years ago

  • Component changed from Administration to Plugins
  • Focuses administration added

@monopine
10 years ago

seperator example

#2 @monopine
10 years ago

  • Summary changed from Hiding Administration Menu Items can create unnecessary margin via the menu separator list item to Hiding Administration Menu Items through remove_menu_page function can create unnecessary margin via the menu separator list item

#3 @monopine
10 years ago

For clarification, the Dashboard menu item is hidden through

function remove_menus() {
	remove_menu_page( 'index.php' );
}
add_action( 'admin_menu', 'remove_menus' );
Note: See TracTickets for help on using tickets.