WPDev.one
Core Function
View Source on Trac ↗

deactivate_plugins()

deactivate_plugins( mixed $plugins, mixed $silent = false, mixed $network_wide = null )

Deactivates a single plugin or multiple plugins.

Parameters 2 required

Name / Type Description
(string

| string[]) $plugins Single plugin or list of plugins to deactivate.

Required
$silent
bool

Prevent calling deactivation hooks. Default false.

mixed

(bool | null) $network_wide Whether to deactivate the plugin for all sites in the network. A value of null will deactivate plugins for both the network and the current site. Multisite only. Default null.

Required

Return Value

(void)
No return value description available.

Function Information

Since Version
2.5.0
Source File
wp-admin/includes/plugin.php
Advertisement