From 6555fb825cee4a467f7ab0232a82878461dab8d6 Mon Sep 17 00:00:00 2001 From: Mukesh Panchal Date: Tue, 17 Nov 2026 16:34:25 +0530 Subject: [PATCH] Upgrade/Install: Remove the `translation_updates` query arg after the notice shows. When no translation update is selected, `update-core.php` redirects with `translation_updates=deferred` to show a notice. The arg was not listed in `wp_removable_query_args()`, so it stayed in the URL and the notice showed again on every reload. Follow-up to [99b0144401]. See #42281. Co-Authored-By: Claude Opus 5.5 --- src/wp-includes/functions.php | 1 + tests/phpunit/tests/functions/wpRemovableQueryArgs.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index d9927baffbcd5..54c72b2d1f891 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -1294,6 +1294,7 @@ function wp_removable_query_args() { 'skipped', 'spammed', 'trashed', + 'translation_updates', 'unspammed', 'untrashed', 'update', diff --git a/tests/phpunit/tests/functions/wpRemovableQueryArgs.php b/tests/phpunit/tests/functions/wpRemovableQueryArgs.php index 3d4ad96e4ff0b..ea0b7e587aad7 100644 --- a/tests/phpunit/tests/functions/wpRemovableQueryArgs.php +++ b/tests/phpunit/tests/functions/wpRemovableQueryArgs.php @@ -14,6 +14,7 @@ class Tests_Functions_WpRemovableQueryArgs extends WP_UnitTestCase { * * @ticket 65819 * @ticket 66300 + * @ticket 42281 */ public function test_returns_default_removable_query_args() { $args = wp_removable_query_args(); @@ -26,6 +27,7 @@ public function test_returns_default_removable_query_args() { $this->assertContains( 'doing_wp_cron', $args ); $this->assertContains( 'wp-post-new-reload', $args ); $this->assertContains( 'network_admin_email_updated', $args ); + $this->assertContains( 'translation_updates', $args ); } /**