X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..5aa86a9053fb0fa15846bb60aac2fb8fdfff524a:/wp-admin/admin-header.php diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 33e88732..a34a51b8 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -7,64 +7,65 @@ */ @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset')); -if (!isset($_GET["page"])) require_once('admin.php'); +if ( ! defined( 'WP_ADMIN' ) ) + require_once( './admin.php' ); + +// In case admin-header.php is included in a function. +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 = wp_specialchars( strip_tags( $title ) ); +$title = esc_html( strip_tags( $title ) ); + +if ( is_network_admin() ) + $admin_title = __( 'Network Admin' ); +elseif ( is_user_admin() ) + $admin_title = __( 'Global Dashboard' ); +else + $admin_title = get_bloginfo( 'name' ); + +if ( $admin_title == $title ) + $admin_title = sprintf( __( '%1$s — WordPress' ), $title ); +else + $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); + +$admin_title = apply_filters( 'admin_title', $admin_title, $title ); + wp_user_settings(); + +_wp_admin_html_begin(); ?> - - > - - -<?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress +<?php echo $admin_title; ?> - +"> +
+
- +
+ - - +$current_screen->set_parentage( $parent_file ); -
- +?>
render_screen_meta(); + +if ( is_network_admin() ) + do_action('network_admin_notices'); +elseif ( is_user_admin() ) + do_action('user_admin_notices'); +else + do_action('admin_notices'); + +do_action('all_admin_notices'); -if ( $parent_file == 'options-general.php' ) { +if ( $parent_file == 'options-general.php' ) require(ABSPATH . 'wp-admin/options-head.php'); -}