Commit 247ce65264 for wordpress.org

commit 247ce6526468b1062e752c1930499233b378466c
Author: lancewillett <lancewillett@git.wordpress.org>
Date:   Fri Oct 16 21:47:47 2026 +0000

    Bootstrap/Load: Recognize network plugins in recovery mode.

    Normalize the absolute paths returned by `wp_get_active_network_plugins()` with `plugin_basename()` before comparing them with extension slugs. Match single-file plugins by basename as well as plugins in directories.

    Add multisite regression tests for network-plugin errors and unrelated plugins with similar names. This corrects network-plugin detection without enabling recovery mode on multisite.

    Developed in: https://github.com/WordPress/wordpress-develop/pull/14355

    Props huzaifaalmesbah.
    Fixes #66328.

    Built from https://develop.svn.wordpress.org/trunk@64431


    git-svn-id: http://core.svn.wordpress.org/trunk@63581 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/class-wp-recovery-mode.php b/wp-includes/class-wp-recovery-mode.php
index 8fa6bf22cb..8ff172c425 100644
--- a/wp-includes/class-wp-recovery-mode.php
+++ b/wp-includes/class-wp-recovery-mode.php
@@ -413,7 +413,10 @@ class WP_Recovery_Mode {
 		$network_plugins = wp_get_active_network_plugins();

 		foreach ( $network_plugins as $plugin ) {
-			if ( str_starts_with( $plugin, $extension['slug'] . '/' ) ) {
+			// wp_get_active_network_plugins() returns full paths, while the slug is relative to the plugins directory.
+			$plugin = plugin_basename( $plugin );
+
+			if ( $plugin === $extension['slug'] || str_starts_with( $plugin, $extension['slug'] . '/' ) ) {
 				return true;
 			}
 		}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 560c373477..3c3c129714 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '7.2-alpha-64430';
+$wp_version = '7.2-alpha-64431';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.