Make WordPress Core


Ignore:
Timestamp:
10/13/2020 07:57:10 PM (3 years ago)
Author:
ocean90
Message:

Administration: Restore alternative admin menu position for menu items with the same position value as an existing menu item.

Reverts parts of [49108].

Props johnjamesjacoby.
Fixes #42918.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r49108 r49138  
    13481348    if ( null === $position ) {
    13491349        $menu[] = $new_menu;
     1350    } elseif ( isset( $menu[ "$position" ] ) ) {
     1351        $position            = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
     1352        $menu[ "$position" ] = $new_menu;
    13501353    } else {
    1351         if ( isset( $menu[ $position ] ) ) {
    1352             $position = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
    1353         }
    1354 
    13551354        $menu[ $position ] = $new_menu;
    13561355    }
Note: See TracChangeset for help on using the changeset viewer.