Skip to content

Administration: Remove unreachable "All selected plugins are up to date." notice in plugins.php - #12859

Open
aminurislamarnob wants to merge 1 commit into
WordPress:trunkfrom
aminurislamarnob:fix/65812-unreachable-plugins-notice
Open

Administration: Remove unreachable "All selected plugins are up to date." notice in plugins.php#12859
aminurislamarnob wants to merge 1 commit into
WordPress:trunkfrom
aminurislamarnob:fix/65812-unreachable-plugins-notice

Conversation

@aminurislamarnob

Copy link
Copy Markdown

Trac ticket: https://core.trac.wordpress.org/ticket/65812

Summary

Removes an unreachable admin-notice branch on the Plugins screen (wp-admin/plugins.php). The elseif ( 'update-selected' === $action ) branch that prints "All selected plugins are up to date." can never execute.

Why it is unreachable

  • $action is assigned once, from WP_Plugins_List_Table::current_action(), and is never reassigned.
  • When $action === 'update-selected', the earlier switch ( $action ) enters case 'update-selected':, which renders the bulk-update iframe and ends in an unconditional exit;.
  • Execution therefore never reaches the notice chain while $action === 'update-selected', so the elseif is always false. PHPStan reports the comparison as "will always evaluate to false."

The string "All selected plugins are up to date." exists nowhere else in wp-admin, and the iframe update screen (update.php?action=update-selected) already reports the up-to-date outcome.

History

The branch was reachable when introduced in [11542] (2010): the handler filtered the selection to out-of-date plugins and breaked (not exit) when all were current, falling through to the notice. The iframe rewrite in [11232] removed that filtering and the break, leaving the notice behind. It has been dead code ever since.

Testing

  • On the Plugins screen, no user action produces the notice; bulk Update always renders the iframe screen.
  • php -l passes; no functional change (removed code was never reached).

…te." 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
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props aminurislam01.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant