Plugins: Fix wp_edit_theme_plugin_file() to detect network-active plugins - #13620
bishalsthadev wants to merge 5 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
plugins. $is_active only checked the site-level active_plugins option, so the fatal-error loopback check was silently skipped for network-active plugins. Use is_plugin_active() instead, which already accounts for network activation.
80f1bf0 to
ce9e77c
Compare
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 #13620. Follow-up to r41721, r63957. Props rainynewt, westonruter, denisflorin117. See #66133. Fixes #66129. git-svn-id: https://develop.svn.wordpress.org/trunk@63982 602fd350-edb4-49c9-b593-d223f7449a82
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 WordPress/wordpress-develop#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
Fixes https://core.trac.wordpress.org/ticket/66129
wp_edit_theme_plugin_file() checked plugin activity with a raw in_array()
against the active_plugins option, which never accounts for network-wide
activation. is_plugin_active() already handles both cases and is used
elsewhere in this file, so this swaps in that helper and adds a
multisite unit test for the loopback-check behavior.