Make WordPress Core

Ticket #32431: 32431.diff

File 32431.diff, 3.0 KB (added by jeremyfelt, 9 years ago)
  • src/wp-admin/network/menu.php

     
    1010/* translators: Network menu item */
    1111$menu[2] = array(__('Dashboard'), 'manage_network', 'index.php', '', 'menu-top menu-top-first menu-icon-dashboard', 'menu-dashboard', 'dashicons-dashboard');
    1212
     13$submenu[ 'index.php' ][0] = array( __('Home'), 'read', 'index.php' );
     14
     15$update_data = wp_get_update_data();
     16if ( $update_data['counts']['total'] ) {
     17        $submenu[ 'index.php' ][10] = array( sprintf( __( 'Available Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), 'update_core', 'update-core.php' );
     18} else {
     19        $submenu[ 'index.php' ][10] = array( __( 'Available Updates' ), 'update_core', 'update-core.php' );
     20}
     21
     22$submenu[ 'index.php' ][15] = array( __( 'Upgrade Network' ), 'manage_network', 'upgrade.php' );
     23
    1324$menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
    1425
    1526/* translators: Sites menu item */
     
    2132$submenu['users.php'][5]  = array( __('All Users'), 'manage_network_users', 'users.php' );
    2233$submenu['users.php'][10]  = array( _x('Add New', 'user'), 'create_users', 'user-new.php' );
    2334
    24 $update_data = wp_get_update_data();
    25 
    2635if ( current_user_can( 'update_themes' ) && $update_data['counts']['themes'] ) {
    2736        $menu[15] = array(sprintf( __( 'Themes %s' ), "<span class='update-plugins count-{$update_data['counts']['themes']}'><span class='theme-count'>" . number_format_i18n( $update_data['counts']['themes'] ) . "</span></span>" ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'dashicons-admin-appearance' );
    2837} else {
     
    4756        $submenu['settings.php'][10] = array( __('Network Setup'), 'manage_network_options', 'setup.php' );
    4857}
    4958
    50 if ( $update_data['counts']['total'] ) {
    51         $menu[30] = array( sprintf( __( 'Updates %s' ), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'dashicons-admin-tools' );
    52 } else {
    53         $menu[30] = array( __( 'Updates' ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'dashicons-admin-tools' );
    54 }
    55 
    56 unset($update_data);
    57 
    58 $submenu[ 'upgrade.php' ][10] = array( __( 'Available Updates' ), 'update_core', 'update-core.php' );
    59 $submenu[ 'upgrade.php' ][15] = array( __( 'Upgrade Network' ), 'manage_network', 'upgrade.php' );
    60 
    6159$menu[99] = array( '', 'exist', 'separator-last', '', 'wp-menu-separator' );
    6260
    63 require_once(ABSPATH . 'wp-admin/includes/menu.php');
     61require_once(ABSPATH . 'wp-admin/includes/menu.php');
     62 No newline at end of file