From 6073a8dce17d6c70c371f2691508e2d0b4c74d1f Mon Sep 17 00:00:00 2001 From: Andrew 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: https://develop.svn.wordpress.org/trunk@19522 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 f2fa9f5818..a34a51b882 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 ) );