[wp-trac] [WordPress Trac] #24205: is_plugin_active() should return true for must-use/dropin plugins

WordPress Trac noreply at wordpress.org
Mon Apr 20 11:06:19 UTC 2015


#24205: is_plugin_active() should return true for must-use/dropin plugins
--------------------------------------+------------------------------
 Reporter:  jrf                       |       Owner:
     Type:  enhancement               |      Status:  reopened
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Plugins                   |     Version:  3.5.1
 Severity:  normal                    |  Resolution:
 Keywords:  has-unit-tests has-patch  |     Focuses:
--------------------------------------+------------------------------
Changes (by jrf):

 * keywords:  has-patch => has-unit-tests has-patch


Comment:

 Added a new patch based on @rcoll's patch for the same.

 Improvements/Changes:
 - Use the more efficient wp_get_mu_plugins() function instead of
 get_mu_plugins()
 - Allow for bootstrapped MU plugins
 - Added relevant unit tests
 - Made the wp_get_mu_plugins() function slightly more efficient as reading
 directories is expensive and the function might now be called several
 times
 - Made the touched functions comply with code style guidelines
 - Checked all core uses of the touched functions (and kept the
 `$check_all` default set to `false` to prevent having to change nearly all
 uses in core)

 What I didn't do:
 - Add unit tests for the network version as that would involve duplicating
 the `_back_up_drop_ins()`, `_restore_drop_ins()`, `_back_up_mu_plugins()`
 and `_restore_mu_plugins()` methods from the `Tests_Admin_includesPlugin`
 class to the `Tests_Multisite_Network` class or moving these methods
 elsewhere (to the `WP_UnitTestCase` class would seem a logical place)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/24205#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list