Plugins: Display Auto-updates filters when the current view is "Must Use" or "Drop-in".

This changeset fixes a bug where the "Auto-updates Enabled/Disabled" filters were not showing when the current view is "Must Use" or "Drop-in".

Props NekoJonez, pbiron, costdev, audrasjb.
Fixes #54309.




git-svn-id: https://develop.svn.wordpress.org/trunk@55903 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jb Audras
2023-06-10 05:28:02 +00:00
parent 855dd129a1
commit 8ddd94e693
2 changed files with 200 additions and 4 deletions
@@ -61,8 +61,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'plugin' )
&& current_user_can( 'update_plugins' )
&& ( ! is_multisite() || $this->screen->in_admin( 'network' ) )
&& ! in_array( $status, array( 'mustuse', 'dropins' ), true );
&& ( ! is_multisite() || $this->screen->in_admin( 'network' ) );
}
/**
@@ -463,7 +462,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
'description' => __( 'Description' ),
);
if ( $this->show_autoupdates ) {
if ( $this->show_autoupdates && ! in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
$columns['auto-updates'] = __( 'Automatic Updates' );
}
@@ -1154,7 +1153,7 @@ class WP_Plugins_List_Table extends WP_List_Table {
echo '</td>';
break;
case 'auto-updates':
if ( ! $this->show_autoupdates ) {
if ( ! $this->show_autoupdates || in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
break;
}