Title fixes for plugin menu pages. fixes #1447

git-svn-id: http://svn.automattic.com/wordpress/trunk@3367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-28 00:45:13 +00:00
parent 365a7b5ee0
commit 97749ecf1d
1 changed files with 5 additions and 3 deletions

View File

@ -1249,7 +1249,9 @@ function get_admin_page_title() {
return $title;
}
$parent = get_admin_page_parent();
$hook = get_plugin_page_hook($plugin_page, $pagenow);
$parent = $parent1 = get_admin_page_parent();
if (empty ($parent)) {
foreach ($menu as $menu_array) {
if (isset ($menu_array[3])) {
@ -1257,7 +1259,7 @@ function get_admin_page_title() {
$title = $menu_array[3];
return $menu_array[3];
} else
if (isset ($plugin_page) && ($plugin_page == $menu_array[2])) {
if (isset ($plugin_page) && ($plugin_page == $menu_array[2]) && ($hook == $menu_array[3])) {
$title = $menu_array[3];
return $menu_array[3];
}
@ -1271,7 +1273,7 @@ function get_admin_page_title() {
$title = $submenu_array[3];
return $submenu_array[3];
} else
if (isset ($plugin_page) && ($plugin_page == $submenu_array[2])) {
if (isset ($plugin_page) && ($plugin_page == $submenu_array[2]) && (($parent == $pagenow) || ($parent == $plugin_page) || ($plugin_page == $hook) || (($pagenow == 'admin.php') && ($parent1 != $submenu_array[2])))) {
$title = $submenu_array[3];
return $submenu_array[3];
}