Network Admin, first pass. see #14435

git-svn-id: https://develop.svn.wordpress.org/trunk@15481 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-07-30 20:34:54 +00:00
parent 2c326f0a87
commit edd48280e3
27 changed files with 2741 additions and 2529 deletions

View File

@@ -11,9 +11,20 @@ if ( ! defined( 'WP_ADMIN' ) )
require_once( './admin.php' );
get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
wp_user_settings();
wp_menu_unfold();
// Save the ID of the last blog admin area visited if super admin.
if ( is_multisite() && !is_network_admin() && is_super_admin() ) {
$last_blog = get_user_option('last-blog-admin-visited');
if ( $last_blog != $blog_id )
update_user_option(get_current_user_id(), 'last-blog-admin-visited', $blog_id, true);
unset($last_blog);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
@@ -86,7 +97,11 @@ document.body.className = c;
<div id="wpcontent">
<div id="wphead">
<?php
$blog_name = get_bloginfo('name', 'display');
if ( is_network_admin() )
$blog_name = esc_html($current_site->site_name);
else
$blog_name = get_bloginfo('name', 'display');
if ( '' == $blog_name ) {
$blog_name = '&nbsp;';
} else {
@@ -111,7 +126,7 @@ if ( function_exists('mb_strlen') ) {
<a href="<?php echo trailingslashit( get_bloginfo( 'url' ) ); ?>" title="<?php esc_attr_e('Visit Site') ?>">
<span id="site-title"><?php echo $blog_name ?></span>
</a>
<?php if ( current_user_can('manage_options') && '1' != get_option('blog_public') ): ?>
<?php if ( !is_network_admin() && current_user_can('manage_options') && '1' != get_option('blog_public') ): ?>
<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>
<?php endif; ?>
</h1>
@@ -123,7 +138,13 @@ if ( function_exists('mb_strlen') ) {
<p><?php
$links = array();
$links[5] = sprintf(__('Howdy, <a href="%1$s" title="Edit your profile">%2$s</a>'), 'profile.php', $user_identity);
$links[15] = '| <a href="' . wp_logout_url() . '" title="' . __('Log Out') . '">' . __('Log Out') . '</a>';
if ( is_multisite() && is_super_admin() ) {
if ( !is_network_admin() )
$links[10] = '| <a href="' . network_admin_url() . '" title="' . esc_attr__('Network Admin') . '">' . __('Network Admin') . '</a>';
elseif ($last_blog = get_user_option('last-blog-admin-visited') )
$links[10] = '| <a href="' . get_admin_url($last_blog) . '" title="' . esc_attr__('Site Admin') . '">' . __('Site Admin') . '</a>';
}
$links[15] = '| <a href="' . wp_logout_url() . '" title="' . esc_attr__('Log Out') . '">' . __('Log Out') . '</a>';
$links = apply_filters('admin_user_info_links', $links, $current_user);
ksort($links);
@@ -132,7 +153,7 @@ echo implode(' ', $links);
?></p>
</div>
<?php favorite_actions($current_screen); ?>
<?php !is_network_admin() ? favorite_actions($current_screen) : ''; ?>
</div>
</div>