WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 months 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 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Plugins Keywords:
Focuses: administration Cc:
PR Number:

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 5 years ago.
seperator example

Download all attachments as: .zip

Change History (5)

#1 @monopine
5 years ago

  • Component changed from Administration to Plugins
  • Focuses administration added

@monopine
5 years ago

seperator example

#2 @monopine
5 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
5 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.