From b1935deee49d158c1064f3e7dc83a41fe244e413 Mon Sep 17 00:00:00 2001 From: nacin Date: Thu, 1 Dec 2011 03:37:22 +0000 Subject: [PATCH] Call set_current_screen() again in admin-header.php in case a plugin includes admin-header.php before admin.php completes. Rare and silly, but seen in the wild. props ryan, see #18785. git-svn-id: http://svn.automattic.com/wordpress/trunk@19522 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index f2fa9f581..a34a51b88 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -14,6 +14,10 @@ if ( ! defined( 'WP_ADMIN' ) ) global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, $is_iphone, $current_site, $update_title, $total_update_count, $parent_file; +// Catch plugins that include admin-header.php before admin.php completes. +if ( empty( $current_screen ) ) + set_current_screen(); + get_admin_page_title(); $title = esc_html( strip_tags( $title ) );