Uses
Uses | Description |
---|---|
wp-admin/includes/plugin.php: is_plugin_active_for_network() | Determines whether the plugin is active for the entire network. |
wp-admin/includes/plugin.php: is_plugin_active() | Determines whether a plugin is active. |
Get’s the activation status for a plugin.
(string) (Required) The plugin file to check.
(string) Either 'network-active', 'active' or 'inactive'.
File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
protected function get_plugin_status( $plugin ) { if ( is_plugin_active_for_network( $plugin ) ) { return 'network-active'; } if ( is_plugin_active( $plugin ) ) { return 'active'; } return 'inactive'; }
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_status