From 162afe2451d0e663421e0731fe9d670ca1384bdf Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Thu, 16 Jul 2020 22:13:54 +0000 Subject: [PATCH] Administration: Fix an index inconsistency in `get_admin_page_title()` function. Ensure that `get_admin_page_title()` returns a value from pages registered using `add_menu_page()`. Fixes #46081. Props grapestain, valentinbora, SergeyBiryukov, audrasjb. git-svn-id: https://develop.svn.wordpress.org/trunk@48500 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index bd757c8a28..05bd0c60f1 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -1956,7 +1956,7 @@ function get_admin_page_title() { if ( $menu_array[2] == $pagenow ) { $title = $menu_array[3]; return $menu_array[3]; - } elseif ( isset( $plugin_page ) && ( $plugin_page == $menu_array[2] ) && ( $hook == $menu_array[3] ) ) { + } elseif ( isset( $plugin_page ) && ( $plugin_page == $menu_array[2] ) && ( $hook == $menu_array[5] ) ) { $title = $menu_array[3]; return $menu_array[3]; }