Make WordPress Core

Ticket #55316: 55316.diff

File 55316.diff, 916 bytes (added by costdev, 4 years ago)

Update item count upon plugin deletion. Do not commit this patch - it needs review for i18n.

  • src/js/_enqueues/wp/updates.js

    diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
    index 1e00589cec..e31c82cda1 100644
    a b  
    970970                        var $form            = $( '#bulk-action-form' ),
    971971                                $views           = $( '.subsubsub' ),
    972972                                $pluginRow       = $( this ),
     973                                $itemsCount      = $( '.displaying-num' ),
    973974                                columnCount      = $form.find( 'thead th:not(.hidden), thead td' ).length,
    974975                                pluginDeletedRow = wp.template( 'item-deleted-row' ),
    975976                                /**
     
    10491050
    10501051                        if ( plugins.all.length ) {
    10511052                                $views.find( '.all .count' ).text( '(' + plugins.all.length + ')' );
     1053
     1054                                if ( $itemsCount.length ) {
     1055                                        $itemsCount.text( plugins.all.length + ' ' + $itemsCount.text().split( ' ' ).slice(2) );
     1056                                }
    10521057                        } else {
    10531058                                $form.find( '.tablenav' ).css( { visibility: 'hidden' } );
    10541059                                $views.find( '.all' ).remove();