Make WordPress Core

Ticket #14897: 14897.8.diff

File 14897.8.diff, 6.3 KB (added by PeteMall, 15 years ago)

Add theme update notification to admin menu.

  • wp-admin/css/colors-classic.dev.css

     
    511511
    512512#adminmenu #awaiting-mod,
    513513#adminmenu .update-plugins,
     514#adminmenu .update-themes,
    514515#sidemenu a .update-plugins,
     516#sidemenu a .update-themes,
    515517#rightnow .reallynow,
    516518#plugin-information .action-button {
    517519        background-color: #d54e21;
     
    520522
    521523#adminmenu li a:hover #awaiting-mod,
    522524#adminmenu li a:hover .update-plugins,
    523 #sidemenu li a:hover .update-plugins {
     525#adminmenu li a:hover .update-themes,
     526#sidemenu li a:hover .update-plugins,
     527#sidemenu li a:hover .update-themes {
    524528        background-color: #264761;
    525529        color: #fff;
    526530}
    527531
    528532#adminmenu li.current a #awaiting-mod,
    529533#adminmenu li.current a .update-plugins,
     534#adminmenu li.current a .update-themes,
    530535#adminmenu li.wp-has-current-submenu a .update-plugins,
    531 #adminmenu li.wp-has-current-submenu a .update-plugins {
     536#adminmenu li.wp-has-current-submenu a .update-themes {
    532537        background-color: #ddd;
    533538        color: #000;
    534539        text-shadow: none;
     
    540545
    541546#adminmenu li.current a:hover #awaiting-mod,
    542547#adminmenu li.current a:hover .update-plugins,
     548#adminmenu li.current a:hover .update-themes,
    543549#adminmenu li.wp-has-current-submenu a:hover #awaiting-mod,
    544 #adminmenu li.wp-has-current-submenu a:hover .update-plugins {
     550#adminmenu li.wp-has-current-submenu a:hover .update-plugins,
     551#adminmenu li.wp-has-current-submenu a:hover .update-themes {
    545552        background-color: #264761;
    546553        color: #fff;
    547554}
  • wp-admin/css/colors-fresh.dev.css

     
    511511
    512512#adminmenu #awaiting-mod,
    513513#adminmenu .update-plugins,
     514#adminmenu .update-themes,
    514515#sidemenu a .update-plugins,
     516#sidemenu a .update-themes,
    515517#rightnow .reallynow {
    516518        background-color: #464646;
    517519        color: #fff;
     
    526528}
    527529
    528530#adminmenu li.current a #awaiting-mod,
    529 #adminmenu  li a.wp-has-current-submenu .update-plugins{
     531#adminmenu  li a.wp-has-current-submenu .update-plugins,
     532#adminmenu  li a.wp-has-current-submenu .update-themes {
    530533        background-color: #464646;
    531534        color: #fff;
    532535        -moz-box-shadow: #fff 0 -1px 0;
  • wp-admin/css/wp-admin.dev.css

     
    12011201
    12021202/* end side admin menu */
    12031203
    1204 /* comments/plugins bubble in menu */
     1204/* comments/plugins/themes bubble in menu */
    12051205#adminmenu #awaiting-mod,
    12061206#adminmenu span.update-plugins,
    1207 #sidemenu li a span.update-plugins {
     1207#adminmenu span.update-themes,
     1208#sidemenu li a span.update-plugins,
     1209#sidemenu li a span.update-themes {
    12081210        position: absolute;
    12091211        font-family: Helvetica, Arial, sans-serif;
    12101212        font-size: 9px;
     
    12201222
    12211223#adminmenu li #awaiting-mod span,
    12221224#adminmenu li span.update-plugins span,
    1223 #sidemenu li a span.update-plugins span {
     1225#adminmenu li span.update-themes span,
     1226#sidemenu li a span.update-plugins span,
     1227#sidemenu li a span.update-themes span {
    12241228        display: block;
    12251229        padding: 0 6px;
    12261230}
  • wp-admin/network/menu.php

     
    2020
    2121$menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div');
    2222
    23 $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div');
     23$plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
     24$update_themes = get_site_transient( 'update_themes' );
     25if ( !empty($update_themes->response) )
     26        $theme_update_count = count( $update_themes->response );
     27$menu[15] = array(sprintf( __('Themes %s'), "<span class='update-themes 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');
    2428$submenu['themes.php'][5]  = array( __('Themes'), 'manage_network_themes', 'themes.php' );
    2529$submenu['themes.php'][10] = array( _x('Add New', 'theme'), 'manage_network_themes', 'theme-install.php' );
    2630$submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' );
    2731
    28 $plugin_update_count = $theme_update_count = $wordpress_update_count = 0;
    2932$update_plugins = get_site_transient( 'update_plugins' );
    3033if ( !empty($update_plugins->response) )
    3134        $plugin_update_count = count( $update_plugins->response );
     
    3740
    3841$menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div');
    3942
    40 $update_themes = get_site_transient( 'update_themes' );
    41 if ( !empty($update_themes->response) )
    42         $theme_update_count = count( $update_themes->response );
    4343$update_wordpress = get_core_updates( array('dismissed' => false) );
    4444if ( !empty($update_wordpress) && !in_array( $update_wordpress[0]->response, array('development', 'latest') ) )
    4545        $wordpress_update_count = 1;
     
    5656$update_title = !empty($update_title) ? esc_attr(implode(', ', $update_title)) : '';
    5757
    5858$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');
    59 $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');
     59$submenu[ 'upgrade.php' ][10] = array( __( 'Updates' ), 'install_plugins',  'update-core.php');
    6060$submenu[ 'upgrade.php' ][15] = array( __( 'Update Network' ), 'manage_network', 'upgrade.php' );
    6161unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $update_count, $update_title, $update_themes, $update_plugins, $update_wordpress);
    6262