| 11 | | * @param {jQuery} $ jQuery object. |
| 12 | | * @param {object} wp WP object. |
| 13 | | * @param {object} settings WP Updates settings. |
| 14 | | * @param {string} settings.ajax_nonce Ajax nonce. |
| 15 | | * @param {object=} settings.plugins Base names of plugins in their different states. |
| 16 | | * @param {Array} settings.plugins.all Base names of all plugins. |
| 17 | | * @param {Array} settings.plugins.active Base names of active plugins. |
| 18 | | * @param {Array} settings.plugins.inactive Base names of inactive plugins. |
| 19 | | * @param {Array} settings.plugins.upgrade Base names of plugins with updates available. |
| 20 | | * @param {Array} settings.plugins.recently_activated Base names of recently activated plugins. |
| 21 | | * @param {object=} settings.themes Plugin/theme status information or null. |
| 22 | | * @param {number} settings.themes.all Amount of all themes. |
| 23 | | * @param {number} settings.themes.upgrade Amount of themes with updates available. |
| 24 | | * @param {number} settings.themes.disabled Amount of disabled themes. |
| 25 | | * @param {object=} settings.totals Combined information for available update counts. |
| 26 | | * @param {number} settings.totals.count Holds the amount of available updates. |
| | 11 | * @param {jQuery} $ jQuery object. |
| | 12 | * @param {object} wp WP object. |
| | 13 | * @param {object} settings WP Updates settings. |
| | 14 | * @param {string} settings.ajax_nonce Ajax nonce. |
| | 15 | * @param {object=} settings.plugins Base names of plugins in their different states. |
| | 16 | * @param {Array} settings.plugins.all Base names of all plugins. |
| | 17 | * @param {Array} settings.plugins.active Base names of active plugins. |
| | 18 | * @param {Array} settings.plugins.inactive Base names of inactive plugins. |
| | 19 | * @param {Array} settings.plugins.upgrade Base names of plugins with updates available. |
| | 20 | * @param {Array} settings.plugins.recently_activated Base names of recently activated plugins. |
| | 21 | * @param {Array} settings.plugins['auto-update-enabled'] Base names of plugins set to auto-update. |
| | 22 | * @param {Array} settings.plugins['auto-update-disabled'] Base names of plugins set to not auto-update. |
| | 23 | * @param {object=} settings.themes Slugs of themes in their different states. |
| | 24 | * @param {Array} settings.themes.all Slugs of all themes. |
| | 25 | * @param {Array} settings.themes.upgrade Slugs of themes with updates available. |
| | 26 | * @param {Arrat} settings.themes.disabled Slugs of disabled themes. |
| | 27 | * @param {Array} settings.themes['auto-update-enabled'] Slugs of themes set to auto-update. |
| | 28 | * @param {Array} settings.themes['auto-update-disabled'] Slugs of themes set to not auto-update. |
| | 29 | * @param {object=} settings.totals Combined information for available update counts. |
| | 30 | * @param {number} settings.totals.count Holds the amount of available updates. |
| | 1014 | if ( -1 !== _.indexOf( plugins['auto-update-enabled'], response.plugin ) ) { |
| | 1015 | plugins['auto-update-enabled'] = _.without( plugins['auto-update-enabled'], response.plugin ); |
| | 1016 | if ( plugins['auto-update-enabled'].length ) { |
| | 1017 | $views.find( '.auto-update-enabled .count' ).text( '(' + plugins['auto-update-enabled'].length + ')' ); |
| | 1018 | } else { |
| | 1019 | $views.find( '.auto-update-enabled' ).remove(); |
| | 1020 | } |
| | 1021 | } |
| | 1022 | |
| | 1023 | if ( -1 !== _.indexOf( plugins['auto-update-disabled'], response.plugin ) ) { |
| | 1024 | plugins['auto-update-disabled'] = _.without( plugins['auto-update-disabled'], response.plugin ); |
| | 1025 | if ( plugins['auto-update-disabled'].length ) { |
| | 1026 | $views.find( '.auto-update-disabled .count' ).text( '(' + plugins['auto-update-disabled'].length + ')' ); |
| | 1027 | } else { |
| | 1028 | $views.find( '.auto-update-disabled' ).remove(); |
| | 1029 | } |
| | 1030 | } |
| | 1031 | |
| | 1561 | if ( -1 !== _.indexOf( themes['auto-update-enabled'], response.slug ) ) { |
| | 1562 | themes['auto-update-enabled'] = _.without( themes['auto-update-enabled'], response.slug ); |
| | 1563 | if ( themes['auto-update-enabled'].length ) { |
| | 1564 | $views.find( '.auto-update-enabled .count' ).text( '(' + themes['auto-update-enabled'].length + ')' ); |
| | 1565 | } else { |
| | 1566 | $views.find( '.auto-update-enabled' ).remove(); |
| | 1567 | } |
| | 1568 | } |
| | 1569 | |
| | 1570 | if ( -1 !== _.indexOf( themes['auto-update-disabled'], response.slug ) ) { |
| | 1571 | themes['auto-update-disabled'] = _.without( themes['auto-update-disabled'], response.slug ); |
| | 1572 | if ( themes['auto-update-disabled'].length ) { |
| | 1573 | $views.find( '.auto-update-disabled .count' ).text( '(' + themes['auto-update-disabled'].length + ')' ); |
| | 1574 | } else { |
| | 1575 | $views.find( '.auto-update-disabled' ).remove(); |
| | 1576 | } |
| | 1577 | } |
| | 1578 | |
| | 1579 | themes.all = _.without( themes.all, response.slug ); |
| | 1580 | |