is_plugin_paused()
最后更新于:2021-11-27 10:01:24
is_plugin_paused( string$plugin)Determines whether a plugin is technically active but was paused while loading.
参数
- $plugin
-
(string) (Required) Path to the plugin file relative to the plugins directory.
响应
(bool) True, if in the list of paused plugins. False, if not in the list.
源文件
文件: gc-admin/includes/plugin.php
function is_plugin_paused( $plugin ) {
if ( ! isset( $GLOBALS['_paused_plugins'] ) ) {
return false;
}
if ( ! is_plugin_active( $plugin ) ) {
return false;
}
list( $plugin ) = explode( '/', $plugin );
return array_key_exists( $plugin, $GLOBALS['_paused_plugins'] );
}