akcjaod 2.9.0
deactivate_plugin
Opis — z kodu źródłowego
Fires before a plugin is deactivated.
If a plugin is silently deactivated (such as during an update), this hook does not fire.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$plugin | string | Path to the plugin file relative to the plugins directory. |
$network_deactivating | bool | Whether the plugin is deactivated for all sites in the network or just the current site. Multisite only. Default false. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'deactivate_plugin', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_action( 'deactivate_plugin', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii