Make WordPress Core

Ticket #30527: add-menu-separator.diff

File add-menu-separator.diff, 679 bytes (added by cfoellmann, 10 years ago)

add_menu_separator function

  • wp-admin/includes/plugin.php

    diff --git wp-admin/includes/plugin.php wp-admin/includes/plugin.php
    index 046ed6d..ab1639d 100644
    function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $f 
    11041104}
    11051105
    11061106/**
     1107 * Add a menu separator
     1108 *
     1109 * @param string $position The position in the menu order the seperator should appear
     1110 *
     1111 * @return array
     1112 */
     1113function add_menu_separator( $position ) {
     1114        global $menu;
     1115
     1116        $menu[$position] = array( '', 'read', 'separator', '', 'wp-menu-separator' );
     1117}
     1118
     1119/**
    11071120 * Add a sub menu page
    11081121 *
    11091122 * This function takes a capability which will be used to determine whether