diff -r 2f6f6f7551ca -r 32102edaa81b web/wp-admin/admin-header.php --- a/web/wp-admin/admin-header.php Thu Sep 16 15:45:36 2010 +0000 +++ b/web/wp-admin/admin-header.php Mon Nov 19 18:26:13 2012 +0100 @@ -7,50 +7,64 @@ */ @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, + $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 ) ); + +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_menu_unfold(); + +_wp_admin_html_begin(); ?> - - > - - -<?php echo $title; ?> ‹ <?php bloginfo('name') ?> — WordPress +<?php echo $admin_title; ?> - - +$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) ); +$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) ); +$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); +$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); + +if ( wp_is_mobile() ) + $admin_body_class .= ' mobile'; + +$admin_body_class .= ' no-customize-support'; + +?> "> + +
+
- - -
- +?>
render_screen_meta(); -if ( $parent_file == 'options-general.php' ) { +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' ) require(ABSPATH . 'wp-admin/options-head.php'); -}