函数原型
is_plugin_paused( string $plugin ): bool
函数描述
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.
函数位置
File: wp-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'] );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 5.2.0 | Introduced. |

