Make WordPress Core

Ticket #23316: 23316.2.patch

File 23316.2.patch, 748 bytes (added by chriscct7, 8 years ago)

Cast to new position string

  • src/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;
     1059                $menu["$position"] = $new_menu;
     1060        } else {
    10581061                $menu[$position] = $new_menu;
     1062        }
    10591063
    10601064        $_registered_pages[$hookname] = true;
    10611065