Titles for network admin and global dashboard. see #15477

git-svn-id: http://svn.automattic.com/wordpress/trunk@16474 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-18 23:02:52 +00:00
parent 762eca08ca
commit 76f3dd920b
2 changed files with 16 additions and 5 deletions

View File

@ -13,14 +13,25 @@ if ( ! defined( 'WP_ADMIN' ) )
get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
$admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, get_bloginfo( 'name' ) );
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();
// Save the ID of the last blog admin area visited if super admin.
if ( is_multisite() && !is_network_admin() && is_super_admin() ) {
if ( is_multisite() && is_blog_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);
@ -102,9 +113,9 @@ document.body.className = c;
<?php
if ( is_network_admin() )
$blog_name = esc_html($current_site->site_name);
$blog_name = sprintf( __('%s Network Admin'), esc_html($current_site->site_name) );
elseif ( is_user_admin() )
$blog_name = __('Global Dashboard');
$blog_name = sprintf( __('%s Global Dashboard'), esc_html($current_site->site_name) );
else
$blog_name = get_bloginfo('name', 'display');
if ( '' == $blog_name ) {

View File

@ -19,7 +19,7 @@ if ( !is_multisite() )
if ( ! current_user_can( 'manage_network' ) )
wp_die( __( 'You do not have permission to access this page.' ) );
$title = __( 'Network Dashboard' );
$title = __( 'Dashboard' );
$parent_file = 'index.php';
add_contextual_help($current_screen,