From 6852db9e11a23d85570bf31f68b853b939d5c216 Mon Sep 17 00:00:00 2001 From: "Md. Aminur Islam" Date: Wed, 5 Aug 2026 18:20:38 +0600 Subject: [PATCH] Administration: Remove unreachable "All selected plugins are up to date." notice. The `elseif ( 'update-selected' === $action )` branch in the Plugins screen notice chain can never execute. `$action` is assigned once and the earlier `update-selected` switch case renders the bulk-update iframe and always ends in `exit`, so `$action` can never still be `'update-selected'` when the notice chain runs (PHPStan reports the comparison as always false). The branch was reachable when introduced in [11542]: the handler filtered the selection to out-of-date plugins and fell through via `break` when all were current, showing the message. The iframe rewrite in [11232] removed that path and made the case exit unconditionally, but left the notice behind. It has been dead code ever since; the iframe update screen already reports the up-to-date outcome. See https://core.trac.wordpress.org/ticket/65812 --- src/wp-admin/plugins.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php index 5c65801631869..520bd03dee20a 100644 --- a/src/wp-admin/plugins.php +++ b/src/wp-admin/plugins.php @@ -740,8 +740,6 @@ wp_admin_notice( __( 'Plugin deactivated.' ), $updated_notice_args ); } elseif ( isset( $_GET['deactivate-multi'] ) ) { wp_admin_notice( __( 'Selected plugins deactivated.' ), $updated_notice_args ); -} elseif ( 'update-selected' === $action ) { - wp_admin_notice( __( 'All selected plugins are up to date.' ), $updated_notice_args ); } elseif ( isset( $_GET['resume'] ) ) { wp_admin_notice( __( 'Plugin resumed.' ), $updated_notice_args ); } elseif ( isset( $_GET['enabled-auto-update'] ) ) {