wpseek.com
WordPress开发者和主题制作者的搜索引擎



is_plugin_paused › WordPress Function

Since5.2.0
已弃用n/a
is_plugin_paused ( $plugin )
参数:
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Required: Yes
返回:
  • (bool) True, if in the list of paused plugins. False, if not in the list.
定义在:
文档:

Determines whether a plugin is technically active but was paused while loading.

For more information on this and similar theme functions, check out the {@link Conditional Tags} article in the Theme Developer Handbook.


源码

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'] );
}