WordPress.org

Make WordPress Core

Ticket #15521: network-site-links.15521.diff

File network-site-links.15521.diff, 2.2 KB (added by filosofo, 3 years ago)
  • wp-admin/network/menu.php

     
    99 
    1010/* translators: Network menu item */ 
    1111$menu[0] = array(__('Dashboard'), 'manage_network', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'div'); 
     12if ( is_multisite() && is_super_admin() && is_network_admin() && ( $last_blog = get_user_option('last-blog-admin-visited') ) ) 
     13        $submenu[ 'index.php' ][10] = array( __('Site Admin'), 'read', get_admin_url( $last_blog ) ); 
    1214 
    1315$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' ); 
    1416 
     
    7072 
    7173require_once(ABSPATH . 'wp-admin/includes/menu.php'); 
    7274 
    73 ?> 
    74  No newline at end of file 
     75?> 
  • wp-admin/menu.php

     
    2828 
    2929if ( is_multisite() ) { 
    3030        $submenu[ 'index.php' ][5] = array( __('My Sites'), 'read', 'my-sites.php' ); 
     31        if ( is_multisite() && is_super_admin() && ! is_network_admin() ) 
     32                $submenu[ 'index.php' ][10] = array( __('Network Admin'), 'manage_network',  network_admin_url() ); 
    3133} else { 
    3234        $plugin_update_count = $theme_update_count = $wordpress_update_count = 0; 
    3335        $update_plugins = get_site_transient( 'update_plugins' ); 
     
    5153 
    5254        $update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : ''; 
    5355 
    54         $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'install_plugins',  'update-core.php'); 
     56        $submenu[ 'index.php' ][15] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-$update_count' title='$update_title'><span class='update-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'install_plugins',  'update-core.php'); 
    5557        unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress); 
    5658} 
    5759