is_plugin_paused

Advertisement

Summery Summery

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

Syntax Syntax

is_plugin_paused( string $plugin )

Description Description

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

Parameters Parameters

$plugin

(Required) Path to the plugin file relative to the plugins directory.

Return Return

(bool) True, if in the list of paused plugins. False, if not in the list.

Source Source

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

Advertisement

Changelog Changelog

Changelog
Version Description
5.2.0 Introduced.

Advertisement

Leave a Reply