X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..41578db67d72562346e4dbb2a14889b23d522813:/wp-admin/admin-header.php diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index ac793409..10349750 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -8,15 +8,23 @@ @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); if ( ! defined( 'WP_ADMIN' ) ) - require_once( './admin.php' ); + require_once( dirname( __FILE__ ) . '/admin.php' ); + +// In case admin-header.php is included in a function. +global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, + $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 ) ); if ( is_network_admin() ) - $admin_title = __( 'Network Admin' ); + $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_current_site()->site_name ) ); elseif ( is_user_admin() ) - $admin_title = __( 'Global Dashboard' ); + $admin_title = sprintf( __( 'Global Dashboard: %s' ), esc_html( get_current_site()->site_name ) ); else $admin_title = get_bloginfo( 'name' ); @@ -25,172 +33,210 @@ if ( $admin_title == $title ) else $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); +/** + * Filter the
%2$s'), 'profile.php', $user_identity); -if ( is_multisite() && is_super_admin() ) { - if ( !is_network_admin() ) - $links[10] = '| ' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . ''; - else - $links[10] = '| ' . __('Site Admin') . ''; -} -$links[15] = '| ' . __('Log Out') . ''; - -$links = apply_filters('admin_user_info_links', $links, $current_user); -ksort($links); - -echo implode(' ', $links); -?>
-