From 63afb0dcc851086f4a83748c0e36b97627dd85de Mon Sep 17 00:00:00 2001 From: Eric Andrew Lewis Date: Tue, 26 Jan 2016 00:31:08 +0000 Subject: [PATCH] Plugins: Clarify that mu-plugins can't be "active" in docs. Plugins installed in the plugins/ folder can be activated by users. This puts the plugin in an "active" state. Plugins in the mu-folder/ are "must-use" plugins that are always loaded. They can't be activated, and thereby can't be "active." Because of this, using the `is_plugin_active()` or `is_plugin_active_for_network()` returns false when checking for these plugins. This clarifies that behavior in the functions' docs. git-svn-id: https://develop.svn.wordpress.org/trunk@36397 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/plugin.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php index 0b504b5994..9c4f913548 100644 --- a/src/wp-admin/includes/plugin.php +++ b/src/wp-admin/includes/plugin.php @@ -427,7 +427,12 @@ function _get_dropins() { } /** - * Check whether the plugin is active by checking the active_plugins list. + * Check whether a plugin is active. + * + * Only plugins installed in the plugins/ folder can be active. + * + * Plugins in the mu-plugins/ folder can't be "activated," so this function will + * return false for those plugins. * * @since 2.5.0 * @@ -456,6 +461,11 @@ function is_plugin_inactive( $plugin ) { /** * Check whether the plugin is active for the entire network. * + * Only plugins installed in the plugins/ folder can be active. + * + * Plugins in the mu-plugins/ folder can't be "activated," so this function will + * return false for those plugins. + * * @since 3.0.0 * * @param string $plugin Base plugin path from plugins directory.