is_plugin_inactive()
is_plugin_inactive( string $plugin )
确定插件是否处于非活动状态。
Determines whether the plugin is inactive.
说明(Description)
另见函数 is_plugin_active()
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$plugin | (string) | 必需 | 相对于插件目录的插件文件路径。 |
返回(Return)
(bool)如果不活动则为真。如果激活,则为False。
源码(Source)
/** * Check whether the plugin is inactive. * * Reverse of is_plugin_active(). Used as a callback. * * @since 3.1.0 * @see is_plugin_active() * * @param string $plugin Base plugin path from plugins directory. * @return bool True if inactive. False if active. */ function is_plugin_inactive( $plugin ) { return ! is_plugin_active( $plugin ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.1.0 | wp-admin/includes/plugin.php:544 | 2 | 1 function |
笔记(Notes)
例子
is_plugin_inactive() 为WP2原创文章,链接:https://www.wp2.cn/functions/is_plugin_inactive/