Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/js/_enqueues/wp/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,11 @@
* @type {Object}
*/
plugins = settings.plugins,
knownKeys = [
'all', 'search', 'upgrade', 'active', 'inactive',
'recently_activated', 'mustuse', 'dropins', 'paused',
'auto-update-enabled', 'auto-update-disabled'
],
remainingCount;

// Add a success message after deleting a plugin.
Expand Down Expand Up @@ -1445,6 +1450,29 @@
}
}

// Decrement counts for any custom group added through the
// `plugins_list` filter (e.g. a tab whose label is supplied
// via `plugins_list_status_text`, introduced in #60495).
_.each( _.keys( plugins ), function( key ) {
if ( -1 !== _.indexOf( knownKeys, key ) ) {
return;
}
if ( ! _.isArray( plugins[ key ] ) ) {
return;
}
if ( -1 === _.indexOf( plugins[ key ], response.plugin ) ) {
return;
}

plugins[ key ] = _.without( plugins[ key ], response.plugin );

if ( plugins[ key ].length ) {
$views.find( '.' + key + ' .count' ).text( '(' + plugins[ key ].length + ')' );
} else {
$views.find( '.' + key ).remove();
}
} );

plugins.all = _.without( plugins.all, response.plugin );

if ( plugins.all.length ) {
Expand Down
4 changes: 4 additions & 0 deletions src/wp-admin/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,10 @@ code {
white-space: nowrap;
}

.subsubsub li:not(:last-child)::after {
content: "|";
}

/* .widefat - main style for tables */
.widefat {
border-spacing: 0;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ public function views() {
foreach ( $views as $class => $view ) {
$views[ $class ] = "\t<li class='$class'>$view";
}
echo implode( " |</li>\n", $views ) . "</li>\n";
echo implode( " </li>\n", $views ) . "</li>\n";
echo '</ul>';
}

Expand Down
Loading