diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php
index 5396f7bca8..6f47c8b6c7 100644
--- a/wp-admin/includes/plugin.php
+++ b/wp-admin/includes/plugin.php
@@ -1325,6 +1325,19 @@ function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $call
$new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $icon_class . $hookname, $hookname, $icon_url );
+ if ( null !== $position && ! is_numeric( $position ) ) {
+ _doing_it_wrong(
+ __FUNCTION__,
+ sprintf(
+ /* translators: %s: add_menu_page() */
+ __( 'The seventh parameter passed to %s should be numeric representing menu position.' ),
+ 'add_menu_page()
'
+ ),
+ '6.0.0'
+ );
+ $position = null;
+ }
+
if ( null === $position || ! is_numeric( $position ) ) {
$menu[] = $new_menu;
} elseif ( isset( $menu[ (string) $position ] ) ) {
@@ -1421,7 +1434,7 @@ function add_submenu_page( $parent_slug, $page_title, $menu_title, $capability,
__FUNCTION__,
sprintf(
/* translators: %s: add_submenu_page() */
- __( 'The seventh parameter passed to %s should be an integer representing menu position.' ),
+ __( 'The seventh parameter passed to %s should be numeric representing menu position.' ),
'add_submenu_page()
'
),
'5.3.0'
diff --git a/wp-includes/version.php b/wp-includes/version.php
index e376df71d7..3d3901ef31 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.0-beta2-53263';
+$wp_version = '6.0-beta2-53264';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.