Skip to content

Commit ca24c7b

Browse files
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 WordPress#13621. Follow-up to r4881, r7525. Props rainynewt, westonruter. Fixes #66133. git-svn-id: https://develop.svn.wordpress.org/trunk@63957 602fd350-edb4-49c9-b593-d223f7449a82
1 parent b702e8d commit ca24c7b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/wp-admin/plugin-editor.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
<?php if ( is_writable( $real_file ) ) : ?>
316316
<div class="editor-notices">
317317
<?php
318-
if ( in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) ) {
318+
if ( is_plugin_active( $plugin ) ) {
319319
wp_admin_notice(
320320
__( '<strong>Warning:</strong> Making changes to active plugins is not recommended.' ),
321321
array(

0 commit comments

Comments
 (0)