Make WordPress Core

Changeset 63957


Ignore:
Timestamp:
09/27/2026 11:37:09 PM (20 hours ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugin-editor.php

    r63567 r63957  
    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.' ),
Note: See TracChangeset for help on using the changeset viewer.