WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 17 months ago

#30527 new enhancement

function to add separator

Reported by: cfoellmann Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-patch needs-refresh
Focuses: Cc:

Description

added the function add_menu_separator( $position ).

Usage:

add_action('admin_menu', 'separator');

function separator() {
   add_menu_separator(61);
}

Adds a separator after 'Appearance'. - Just an example.

Attachments (1)

add-menu-separator.diff (679 bytes) - added by cfoellmann 4 years ago.
add_menu_separator function

Download all attachments as: .zip

Change History (8)

@cfoellmann
4 years ago

add_menu_separator function

#1 @cfoellmann
4 years ago

  • Keywords has-patch added
  • Severity changed from normal to minor

#2 @respectyoda
4 years ago

Adding menu separators, just not after Appearance, in the admin area is really up to the user. The user can just add this function to their functions.php, provided they are working with a child theme. Here's a concrete example of how someone can do this in the form of a screenshot.

http://grab.by/CFBI

#3 @cfoellmann
4 years ago

Your comment is not really related to my core patch. The function complements the set of functions allowing developer to manipulate the admin_menu. Your code just adds some css colors. It doesn't allow for adding new separators into the $menu object.

#5 @helen
4 years ago

  • Version trunk deleted

#6 @ocean90
3 years ago

#32823 was marked as a duplicate.

#7 @swissspidy
17 months ago

  • Component changed from Plugins to Administration
  • Keywords needs-refresh added
  • Milestone changed from Awaiting Review to Future Release

Function needs some inline docs improvements.

Note: See TracTickets for help on using tickets.