From 7c05cbe3cf7c6614616f0f6d1a339f21d99ef63e Mon Sep 17 00:00:00 2001 From: Huzaifa Al Mesbah Date: Wed, 18 Nov 2026 15:03:45 +0600 Subject: [PATCH] Plugins: Pass the correct `$network_wide` value when scraping a network activation error. When a network activation fails, the error notice loads the `error_scrape` action in an iframe to show the plugin's output. The iframe URL was built with `admin_url()`, so the scrape ran in the site admin, `is_network_admin()` returned false, and `activate_{$plugin}` received `$network_wide = false` for a network activation. Build the URL with `self_admin_url()` instead, so a network activation is scraped in the network admin and the hook receives `true`. Follow-up to r62931. See #36406. --- src/wp-admin/plugins.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/plugins.php b/src/wp-admin/plugins.php index 62e904accaac2..d21f5e6360561 100644 --- a/src/wp-admin/plugins.php +++ b/src/wp-admin/plugins.php @@ -699,7 +699,7 @@ 'plugin' => urlencode( $plugin ), '_wpnonce' => urlencode( $_GET['_error_nonce'] ), ), - admin_url( 'plugins.php' ) + self_admin_url( 'plugins.php' ) ); $errmsg .= '';