On this page
is_plugin_inactive( string $plugin ): bool
Determines whether the plugin is inactive.
Description
Reverse of is_plugin_active() . Used as a callback.
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
See also
Parameters
$pluginstring Required-
Path to the plugin file relative to the plugins directory.
Return
bool True if inactive. False if active.
More Information
Usage:
In the Admin Area:
<?php $active = is_plugin_inactive( $plugin ); ?>
In the front end, in a theme, etc…
<?php
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$active = is_plugin_inactive( $plugin );
?>
Source
File: wp-admin/includes/plugin.php. View all references
function is_plugin_inactive( $plugin ) {
return ! is_plugin_active( $plugin );
}
Related
Uses
| Uses | Description |
|---|---|
| is_plugin_active() wp-admin/includes/plugin.php | Determines whether a plugin is active. |
Used By
| Used By | Description |
|---|---|
| do_block_editor_incompatible_meta_box() wp-admin/includes/template.php | Renders a “fake” meta box with an information message, shown on the block editor, when an incompatible meta box is found. |
| wp_ajax_install_plugin() wp-admin/includes/ajax-actions.php | Ajax handler for installing a plugin. |
| wp_link_manager_disabled_message() wp-admin/includes/bookmark.php | Outputs the ‘disabled’ message for the WordPress Link Manager. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/is_plugin_inactive