is_plugin_paused

The timeline below displays how wordpress function is_plugin_paused has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * 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 https://developer.wordpress.org/themes/basics/conditional-tags/
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 5.2.0
 *
 * @global WP_Paused_Extensions_Storage $_paused_plugins
 *
 * @param string $plugin Path to the plugin file relative to the plugins directory.
 * @return bool True, if in the list of paused plugins. False, if not in the list.
 */
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']);
}

WordPress Version: 5.4

/**
 * 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 https://developer.wordpress.org/themes/basics/conditional-tags/
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 5.2.0
 *
 * @param string $plugin Path to the plugin file relative to the plugins directory.
 * @return bool True, if in the list of paused plugins. False, if not in the list.
 */
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']);
}

WordPress Version: 5.2

/**
 * 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 https://developer.wordpress.org/themes/basics/conditional-tags/
 * Conditional Tags} article in the Theme Developer Handbook.
 *
 * @since 5.2.0
 *
 * @param string $plugin Path to the plugin file relative to the plugins directory.
 * @return bool True, if in the list of paused plugins. False, not in the list.
 */
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']);
}