Make WordPress Core

Ticket #23316: 23316.patch

File 23316.patch, 734 bytes (added by chriscct7, 9 years ago)
  • wp-admin/includes/plugin.php

     
    10521052
    10531053        $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $icon_class . $hookname, $hookname, $icon_url );
    10541054
    1055         if ( null === $position )
     1055        if ( null === $position ) {
    10561056                $menu[] = $new_menu;
    1057         else
     1057        } else if ( isset( $menu[$position] ) ) {
     1058                $position = $position + substr(base_convert(md5( $menu_slug . $menu_title ), 16, 10) , -5) * 0.00001;
    10581059                $menu[$position] = $new_menu;
     1060        } else {
     1061                $menu[$position] = $new_menu;
     1062        }
    10591063
    10601064        $_registered_pages[$hookname] = true;
    10611065