Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r17217 r18232  
    6969
    7070if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) {
    71     add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 );
    72     add_action( 'admin_print_footer_scripts', 'wp_tiny_mce_preload_dialogs', 30 );
    7371    wp_enqueue_script('quicktags');
    7472}
     
    8785if ( is_admin_bar_showing() )
    8886    $admin_body_class .= ' admin-bar';
     87
     88if ( is_rtl() )
     89    $admin_body_class .= ' rtl';
     90
     91$admin_body_class .= ' branch-' . str_replace( '.', '-', floatval( $wp_version ) );
     92$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
     93$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
    8994
    9095if ( $is_iphone ) { ?>
     
    104109
    105110<div id="wpwrap">
     111<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
    106112<div id="wpcontent">
    107113<div id="wphead">
     
    133139?>
    134140
    135 <img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="32" height="32" />
     141<img id="header-logo" src="<?php echo esc_url( includes_url( 'images/blank.gif' ) ); ?>" alt="" width="16" height="16" />
    136142<h1 id="site-heading" <?php echo $title_class ?>>
    137143    <a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
    138144        <span id="site-title"><?php echo $blog_name ?></span>
    139145    </a>
    140 <?php if ( !is_network_admin() && !is_user_admin() && current_user_can('manage_options') && '1' != get_option('blog_public') ): ?>
    141     <a id="privacy-on-link" href="options-privacy.php" title="<?php echo esc_attr( apply_filters('privacy_on_link_title', __('Your site is asking search engines not to index its content') ) ); ?>"><?php echo apply_filters('privacy_on_link_text', __('Search Engines Blocked') ); ?></a>
    142 <?php endif; ?>
    143146</h1>
    144147
    145 <?php do_action('in_admin_header'); ?>
     148<?php
     149
     150do_action('in_admin_header');
     151
     152$links = array();
     153
     154// Generate user profile and info links.
     155$links[5] = sprintf( __('Howdy, %1$s'), $user_identity );
     156
     157$links[8] = '<a href="profile.php" title="' . esc_attr__('Edit your profile') . '">' . __('Your Profile') . '</a>';
     158
     159if ( is_multisite() && is_super_admin() ) {
     160    if ( !is_network_admin() )
     161        $links[10] = '<a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>';
     162    else
     163        $links[10] = '<a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
     164}
     165
     166$links[15] = '<a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
     167
     168$links = apply_filters( 'admin_user_info_links', $links, $current_user );
     169ksort( $links );
     170
     171// Trim whitespace and pipes from links, then convert to list items.
     172$links = array_map( 'trim', $links, array_fill( 0, count( $links ), " |\n\t" ) );
     173
     174$howdy = array_shift( $links );
     175
     176$links_no_js = implode( ' | ', $links );
     177$links_js = '<li>' . implode( '</li><li>', $links ) . '</li>';
     178
     179?>
    146180
    147181<div id="wphead-info">
    148182<div id="user_info">
    149 <p><?php
    150 $links = array();
    151 $links[5] = sprintf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity);
    152 if ( is_multisite() && is_super_admin() ) {
    153     if ( !is_network_admin() )
    154         $links[10] = '| <a href="' . network_admin_url() . '" title="' . ( ! empty( $update_title ) ? $update_title : esc_attr__('Network Admin') ) . '">' . __('Network Admin') . ( ! empty( $total_update_count ) ? ' (' . number_format_i18n( $total_update_count ) . ')' : '' ) . '</a>';
    155     else
    156         $links[10] = '| <a href="' . get_dashboard_url( get_current_user_id() ) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
    157 }
    158 $links[15] = '| <a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
    159 
    160 $links = apply_filters('admin_user_info_links', $links, $current_user);
    161 ksort($links);
    162 
    163 echo implode(' ', $links);
    164 ?></p>
    165 </div>
    166 
    167 <?php favorite_actions($current_screen); ?>
     183    <p class="hide-if-js"><?php echo "$howdy | $links_no_js"; ?></p>
     184
     185    <div class="hide-if-no-js">
     186        <p><?php echo $howdy; ?></p>
     187        <div id="user_info_arrow"></div>
     188        <div id="user_info_links_wrap"><div id="user_info_links">
     189            <ul><?php echo $links_js; ?></ul>
     190        </div></div>
     191    </div>
    168192</div>
    169193</div>
    170194
     195</div>
     196
    171197<div id="wpbody">
    172198<?php
    173199unset($title_class, $blog_name, $total_update_count, $update_title);
    174 
    175 require(ABSPATH . 'wp-admin/menu-header.php');
    176200
    177201$current_screen->parent_file = $parent_file;
Note: See TracChangeset for help on using the changeset viewer.