Commit f2a40458a2 for wordpress.org
commit f2a40458a20e9408131a0dabf2bd6605bc07551f
Author: SergeyBiryukov <sergeybiryukov@git.wordpress.org>
Date: Sun Sep 27 23:38:46 2026 +0000
Plugin Editor: Use a consistent way to check for an active plugin.
This ensures that the “Making changes to active plugins is not recommended” warning is displayed for network-activated plugins too.
Developed in https://github.com/WordPress/wordpress-develop/pull/13621.
Follow-up to r4881, r7525.
Props rainynewt, westonruter.
Fixes #66133.
Built from https://develop.svn.wordpress.org/trunk@63957
git-svn-id: http://core.svn.wordpress.org/trunk@63123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php
index b129a7652b..c72333fe14 100644
--- a/wp-admin/plugin-editor.php
+++ b/wp-admin/plugin-editor.php
@@ -315,7 +315,7 @@ printf(
<?php if ( is_writable( $real_file ) ) : ?>
<div class="editor-notices">
<?php
- if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) {
+ if ( is_plugin_active( $plugin ) ) {
wp_admin_notice(
__( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ),
array(
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 3c58464cc7..3d03be3baa 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63956';
+$wp_version = '7.2-alpha-63957';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.