Make WordPress Core

Ticket #55316: 55316.2.diff

File 55316.2.diff, 1.0 KB (added by costdev, 4 years ago)

Patch updated to use the count of the current view. Still needs a refresh for i18n if anyone is familiar with this.

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

    diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
    index 1e00589cec..d2da73b900 100644
    a b  
    970970                        var $form            = $( '#bulk-action-form' ),
    971971                                $views           = $( '.subsubsub' ),
    972972                                $pluginRow       = $( this ),
     973                                $currentView     = $views.find( '[aria-current="page"]' ),
     974                                $itemsCount      = $( '.displaying-num' ),
    973975                                columnCount      = $form.find( 'thead th:not(.hidden), thead td' ).length,
    974976                                pluginDeletedRow = wp.template( 'item-deleted-row' ),
    975977                                /**
     
    10571059                                        $form.find( '#the-list' ).append( '<tr class="no-items"><td class="colspanchange" colspan="' + columnCount + '">' + __( 'No plugins are currently available.' ) + '</td></tr>' );
    10581060                                }
    10591061                        }
     1062
     1063                        if ( $itemsCount.length && $currentView.length ) {
     1064                                $itemsCount.text( plugins[ $currentView.parent( 'li' ).attr('class') ].length + ' ' + $itemsCount.text().split( ' ' ).slice(2) );
     1065                        }
    10601066                } );
    10611067
    10621068                wp.a11y.speak( _x( 'Deleted!', 'plugin' ) );