X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/f9001779751f83dc8a10e478bfecb4d8dd5f964c..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-admin/admin-header.php diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index ac793409..248897c9 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -10,6 +10,14 @@ 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 ) ); @@ -28,51 +36,35 @@ else $admin_title = apply_filters( 'admin_title', $admin_title, $title ); wp_user_settings(); -wp_menu_unfold(); +_wp_admin_html_begin(); ?> - - > - - <?php echo $admin_title; ?> - - +if ( is_rtl() ) + $admin_body_class .= ' rtl'; + +$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'; + +?> "> + +
+
- -
set_parentage( $parent_file ); -$current_screen->parent_file = $parent_file; -$current_screen->parent_base = preg_replace('/\?.*$/', '', $parent_file); -$current_screen->parent_base = str_replace('.php', '', $current_screen->parent_base); ?>
render_screen_meta(); if ( is_network_admin() ) do_action('network_admin_notices');