Commit abfe2345a7 for wordpress.org
commit abfe2345a7d272c55f11ad38bd2c854ce5583a45
Author: westonruter <westonruter@git.wordpress.org>
Date: Mon Sep 28 17:57:48 2026 +0000
Plugins: Run fatal error check for network-active plugin edits.
The `wp_edit_theme_plugin_file()` function determined whether a plugin was active by only checking the site-level `active_plugins` option, so network-active plugins were treated as inactive and the loopback request that checks for fatal errors was skipped when editing their PHP files. Now `is_plugin_active()` is used instead, which also accounts for network activation.
Developed in https://github.com/WordPress/wordpress-develop/pull/13620.
Follow-up to r41721, r63957.
Props rainynewt, westonruter, denisflorin117.
See #66133.
Fixes #66129.
Built from https://develop.svn.wordpress.org/trunk@63982
git-svn-id: http://core.svn.wordpress.org/trunk@63145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php
index ef5a5025be..79a08bb2b9 100644
--- a/wp-admin/includes/file.php
+++ b/wp-admin/includes/file.php
@@ -425,11 +425,7 @@ function wp_edit_theme_plugin_file( $args ) {
$real_file = WP_PLUGIN_DIR . '/' . $file;
- $is_active = in_array(
- $plugin,
- (array) get_option( 'active_plugins', array() ),
- true
- );
+ $is_active = is_plugin_active( $plugin );
} elseif ( ! empty( $args['theme'] ) ) {
$stylesheet = $args['theme'];
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 717869333e..a88ee97b42 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63981';
+$wp_version = '7.2-alpha-63982';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.