Make WordPress Core

Ticket #37127: 37127.diff

File 37127.diff, 1011 bytes (added by swissspidy, 9 years ago)
  • src/wp-admin/js/updates.js

    diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
    index 053aabc..8a3be24 100644
     
    295295                $dashboardNavMenuUpdateCount.removeAttr( 'title' );
    296296                $dashboardNavMenuUpdateCount.find( '.update-count' ).text( count );
    297297
    298                 switch ( type ) {
    299                         case 'plugin':
    300                                 $menuItem  = $( '#menu-plugins' );
    301                                 $itemCount = $menuItem.find( '.plugin-count' );
    302                                 break;
    303 
    304                         case 'theme':
    305                                 $menuItem  = $( '#menu-appearance' );
    306                                 $itemCount = $menuItem.find( '.theme-count' );
    307                                 break;
    308 
    309                         default:
    310                                 window.console.error( '"%s" is not white-listed to have its count decremented.', type );
    311                                 return;
     298                if ( 'plugin' === type ) {
     299                        $menuItem  = $( '#menu-plugins' );
     300                        $itemCount = $menuItem.find( '.plugin-count' );
     301                } else if ( 'theme' === type ) {
     302                        $menuItem  = $( '#menu-appearance' );
     303                        $itemCount = $menuItem.find( '.theme-count' );
    312304                }
    313305
    314306                // Decrement the counter of the other menu items.