Make WordPress Core

Ticket #50870: 50870.diff

File 50870.diff, 1.2 KB (added by noisysocks, 5 years ago)
  • src/js/_enqueues/wp/updates.js

     
    10071007                                }
    10081008                        }
    10091009
     1010                        if ( -1 !== _.indexOf( plugins['auto-update-enabled'], response.plugin ) ) {
     1011                                plugins['auto-update-enabled'] = _.without( plugins['auto-update-enabled'], response.plugin );
     1012                                if ( plugins['auto-update-enabled'].length ) {
     1013                                        $views.find( '.auto-update-enabled .count' ).text( '(' + plugins['auto-update-enabled'].length + ')' );
     1014                                } else {
     1015                                        $views.find( '.auto-update-enabled' ).remove();
     1016                                }
     1017                        }
     1018
     1019                        if ( -1 !== _.indexOf( plugins['auto-update-disabled'], response.plugin ) ) {
     1020                                plugins['auto-update-disabled'] = _.without( plugins['auto-update-disabled'], response.plugin );
     1021                                if ( plugins['auto-update-disabled'].length ) {
     1022                                        $views.find( '.auto-update-disabled .count' ).text( '(' + plugins['auto-update-disabled'].length + ')' );
     1023                                } else {
     1024                                        $views.find( '.auto-update-disabled' ).remove();
     1025                                }
     1026                        }
     1027
    10101028                        plugins.all = _.without( plugins.all, response.plugin );
    10111029
    10121030                        if ( plugins.all.length ) {