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. Built from https://develop.svn.wordpress.org/trunk@49138 git-svn-id: http://core.svn.wordpress.org/trunk@48900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fe59c4bdc
commit
7137daec42
|
@ -1347,11 +1347,10 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $func
|
||||||
|
|
||||||
if ( null === $position ) {
|
if ( null === $position ) {
|
||||||
$menu[] = $new_menu;
|
$menu[] = $new_menu;
|
||||||
|
} elseif ( isset( $menu[ "$position" ] ) ) {
|
||||||
|
$position = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
|
||||||
|
$menu[ "$position" ] = $new_menu;
|
||||||
} else {
|
} else {
|
||||||
if ( isset( $menu[ $position ] ) ) {
|
|
||||||
$position = $position + substr( base_convert( md5( $menu_slug . $menu_title ), 16, 10 ), -5 ) * 0.00001;
|
|
||||||
}
|
|
||||||
|
|
||||||
$menu[ $position ] = $new_menu;
|
$menu[ $position ] = $new_menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-49137';
|
$wp_version = '5.6-alpha-49138';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue