Changeset 17029
- Timestamp:
- 12/17/2010 06:51:19 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network/menu.php
r16611 r17029 22 22 $submenu['users.php'][10] = array( _x('Add New', 'user'), 'create_users', 'user-new.php' ); 23 23 24 $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); 24 $plugin_update_count = $theme_update_count = $wordpress_update_count = 0; 25 $update_themes = get_site_transient( 'update_themes' ); 26 if ( !empty($update_themes->response) ) 27 $theme_update_count = count( $update_themes->response ); 28 $menu[15] = array(sprintf(__('Themes %s'), "<span class='update-plugins count-$theme_update_count'><span class='theme-count'>" . number_format_i18n($theme_update_count) . "</span></span>" ), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); 25 29 $submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); 26 30 $submenu['themes.php'][10] = array( _x('Add New', 'theme'), 'install_themes', 'theme-install.php' ); 27 31 $submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' ); 28 32 29 $plugin_update_count = $theme_update_count = $wordpress_update_count = 0;30 33 $update_plugins = get_site_transient( 'update_plugins' ); 31 34 if ( !empty($update_plugins->response) ) … … 43 46 } 44 47 45 $update_themes = get_site_transient( 'update_themes' );46 if ( !empty($update_themes->response) )47 $theme_update_count = count( $update_themes->response );48 48 $update_wordpress = get_core_updates( array('dismissed' => false) ); 49 49 if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) ) … … 62 62 63 63 $menu[30] = 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>" ), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div'); 64 $submenu[ 'upgrade.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');64 $submenu[ 'upgrade.php' ][10] = array( __( 'Updates' ), 'install_plugins', 'update-core.php' ); 65 65 $submenu[ 'upgrade.php' ][15] = array( __( 'Update Network' ), 'manage_network', 'upgrade.php' ); 66 66 unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
Note: See TracChangeset
for help on using the changeset viewer.