WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/30/2010 08:34:54 PM (10 years ago)
Author:
ryan
Message:

Network Admin, first pass. see #14435

File:
1 edited

Legend:

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

    r14999 r15481  
    1212
    1313get_admin_page_title();
     14
    1415$title = esc_html( strip_tags( $title ) );
     16
    1517wp_user_settings();
    1618wp_menu_unfold();
     19
     20// Save the ID of the last blog admin area visited if super admin.
     21if ( is_multisite() && !is_network_admin() && is_super_admin() ) {
     22    $last_blog = get_user_option('last-blog-admin-visited');
     23    if ( $last_blog != $blog_id )
     24        update_user_option(get_current_user_id(), 'last-blog-admin-visited', $blog_id, true);
     25    unset($last_blog);
     26}
     27
    1728?>
    1829<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    8798<div id="wphead">
    8899<?php
    89 $blog_name = get_bloginfo('name', 'display');
     100
     101if ( is_network_admin() )
     102    $blog_name = esc_html($current_site->site_name);
     103else
     104    $blog_name = get_bloginfo('name', 'display');
    90105if ( '' == $blog_name ) {
    91106    $blog_name = '&nbsp;';
     
    112127        <span id="site-title"><?php echo $blog_name ?></span>
    113128    </a>
    114 <?php if ( current_user_can('manage_options') && '1' != get_option('blog_public') ): ?>
     129<?php if ( !is_network_admin() && current_user_can('manage_options') && '1' != get_option('blog_public') ): ?>
    115130    <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>
    116131<?php endif; ?>
     
    124139$links = array();
    125140$links[5] = sprintf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity);
    126 $links[15] = '| <a href="' . wp_logout_url() . '" title="' . __('Log Out') . '">' . __('Log Out') . '</a>';
     141if ( is_multisite() && is_super_admin() ) {
     142    if ( !is_network_admin() )
     143        $links[10] = '| <a href="' . network_admin_url() . '" title="' . esc_attr__('Network Admin') . '">' . __('Network Admin') . '</a>';
     144    elseif ($last_blog = get_user_option('last-blog-admin-visited') )
     145        $links[10] = '| <a href="' . get_admin_url($last_blog) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
     146}
     147$links[15] = '| <a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
    127148
    128149$links = apply_filters('admin_user_info_links', $links, $current_user);
     
    133154</div>
    134155
    135 <?php favorite_actions($current_screen); ?>
     156<?php !is_network_admin() ? favorite_actions($current_screen) : ''; ?>
    136157</div>
    137158</div>
Note: See TracChangeset for help on using the changeset viewer.