WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/25/2021 01:19:54 PM (7 months ago)
Author:
SergeyBiryukov
Message:

Plugins: When loading a plugin in a "sandbox" on activation, do it once.

This avoids a fatal error if the plugin is already included, e.g. in unit tests.

Follow-up to [50787].

See #31104.

File:
1 edited

Legend:

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

    r50787 r50788  
    22932293
    22942294    wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
    2295     include WP_PLUGIN_DIR . '/' . $plugin;
     2295    include_once WP_PLUGIN_DIR . '/' . $plugin;
    22962296}
    22972297
Note: See TracChangeset for help on using the changeset viewer.